Interface SmppProvider


  • public interface SmppProvider
    Entry point to API for sending SMPP requests. The only operations are to open a new session or find a bound session. All subsequent operations are performed on the session activity.

    Session creation example

    SmppSession session = provider.openSession(host, port);

    Bound session example

    SmppSession session = provider.getBoundSession(boundSessionName);

    • Method Detail

      • openSession

        SmppSession openSession​(String host,
                                int port)
                         throws SmppException
        Open a new service-managed SMPP session. Use of service-managed sessions is discouraged. When using bound sessions, the resource adaptor will manage the session-level concerns (binding, enquire link support, inactivity timeouts, disconnection alarms, reconnecting, etc.) Service-managed sessions should only be used if a bound session cannot be used for some reason.
        Parameters:
        host - the hostname or IP address of the SMPP peer to connect to
        port - the TCP port to connect to. The standard SMPP port is 2775
        Returns:
        the session activity representing the newly created session
        Throws:
        SmppException - if the stack is unable to connect for any reason
      • getBoundSession

        SmppSession getBoundSession​(String name)
        Get bound SMPP session by name. If there is no session configured with the given name, this method will return null. If the RA entity is not active, this method will return a dummy session object. This dummy session will returns `false` from the SmppSession.isBound() method, SmppSession.STATE_INVALID from the SmppSession.getState() method, and throw IllegalStateException from all other methods.
        Parameters:
        name - the name of the bound session as defined in the configuration
        Returns:
        the session activity representing the existing bound session, or null if there is no session configured with that name