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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SmppSession
getBoundSession(String name)
Get bound SMPP session by name.SmppSession
openSession(String host, int port)
Open a new service-managed SMPP session.
-
-
-
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 toport
- 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 theSmppSession.isBound()
method,SmppSession.STATE_INVALID
from theSmppSession.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
-
-