Version

SmppSession

public interface SmppSession
SmppSession defines the core interface for managing an SMPP session, whether initiated by a client or accepted by a server. It exposes lifecycle control, state tracking, PDU transmission, and session configuration. This interface is central to the operation of both client and server-side SMPP interactions.
Use this interface to interact with a session after a connection has been established, including sending and receiving PDUs, handling state transitions, and managing session termination.

Fields:

Field Description
int STATE_INITIAL Initial state before any connection is made.
int STATE_OPEN TCP connection established, waiting for bind.
int STATE_BINDING Bind request in progress.
int STATE_BOUND Bind accepted, session is active.
int STATE_UNBINDING Unbind request in progress.
int STATE_CLOSED Session closed.
String[] STATES Array of state names (indexed by the constants above).

Methods:

SmppBindType getBindType() Returns the type of bind (e.g., receiver, transmitter, transceiver).
SmppSession.Type getLocalType() Gets the local session type (client or server).
SmppSession.Type getRemoteType() Gets the remote session type.
SmppSessionConfiguration getConfiguration() Returns the current session configuration.
String getStateName() Returns a human-readable name of the current session state.
SmppVersion getInterfaceVersion() Returns the negotiated SMPP version.
boolean areOptionalParametersSupported() Indicates if TLV optional parameters are supported in this session.
boolean isOpen() Returns true if the session is connected.
boolean isBinding() Returns true if the session is in the process of binding.
boolean isBound() Returns true if the session is fully bound and operational.
boolean isUnbinding() Returns true if the session is unbinding.
boolean isClosed() Returns true if the session is closed.
long getBoundTime() Returns the system timestamp when the session was successfully bound.
void close() Actively closes the session.
void passiveClose() Passively closes the session (typically on remote close).
void unbind(long timeoutMillis) Sends an unbind request and waits for the session to close.
void destroy() Immediately terminates and cleans up the session.
void bind(BaseBind request, long timeoutMillis)

Sends a bind request with a timeout.

Throws: RecoverablePduException, UnrecoverablePduException, SmppTimeoutException, SmppChannelException, InterruptedException

void sendRequestPdu(PduRequest<?> request)

Sends a request PDU to the remote peer.

Throws: RecoverablePduException, UnrecoverablePduException, SmppTimeoutException, SmppChannelException, InterruptedException

void sendResponsePdu(PduResponse response)

Sends a response PDU back to the peer.

Throws: RecoverablePduException, UnrecoverablePduException, SmppChannelException, InterruptedException

Start innovating with Mobius

What's next? Let's talk!

Mobius Software

As a company you'll get:

  • Get started quickly

  • Support any business model

  • Join millions of businesses

Questions? websupport@mobius.com