public class SMPPServerSession extends AbstractSession implements ServerSession
Constructor and Description |
---|
SMPPServerSession(Connection conn,
SessionStateListener sessionStateListener,
ServerMessageReceiverListener messageReceiverListener,
ServerResponseDeliveryListener responseDeliveryListener,
int pduProcessorDegree) |
SMPPServerSession(Connection conn,
SessionStateListener sessionStateListener,
ServerMessageReceiverListener messageReceiverListener,
ServerResponseDeliveryListener responseDeliveryListener,
int pduProcessorDegree,
PDUSender pduSender,
PDUReader pduReader) |
Modifier and Type | Method and Description |
---|---|
void |
alertNotification(int sequenceNumber,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
java.lang.String sourceAddr,
TypeOfNumber esmeAddrTon,
NumberingPlanIndicator esmeAddrNpi,
java.lang.String esmeAddr,
OptionalParameter... optionalParameters)
Send alert notification to ESME in order to notify the particular mobile
subscriber has become available.
|
protected Connection |
connection() |
void |
deliverShortMessage(java.lang.String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
java.lang.String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
java.lang.String destinationAddr,
ESMClass esmClass,
byte protocoId,
byte priorityFlag,
RegisteredDelivery registeredDelivery,
DataCoding dataCoding,
byte[] shortMessage,
OptionalParameter... optionalParameters)
Submit a short message to specified destination address (ESME).
|
ServerMessageReceiverListener |
getMessageReceiverListener() |
protected GenericMessageReceiverListener |
messageReceiverListener() |
protected AbstractSessionContext |
sessionContext() |
void |
setMessageReceiverListener(ServerMessageReceiverListener messageReceiverListener) |
void |
setResponseDeliveryListener(ServerResponseDeliveryListener responseDeliveryListener) |
BindRequest |
waitForBind(long timeout)
Wait for bind request.
|
addSessionStateListener, close, dataShortMessage, executeSendCommand, fireAcceptDataSm, getEnquireLinkTimer, getLastActivityTimestamp, getPduProcessorDegree, getSessionId, getSessionState, getTransactionTimer, pduSender, removePendingResponse, removeSessionStateListener, sendEnquireLink, sequence, setEnquireLinkTimer, setPduProcessorDegree, setTransactionTimer, unbindAndClose
public SMPPServerSession(Connection conn, SessionStateListener sessionStateListener, ServerMessageReceiverListener messageReceiverListener, ServerResponseDeliveryListener responseDeliveryListener, int pduProcessorDegree)
public SMPPServerSession(Connection conn, SessionStateListener sessionStateListener, ServerMessageReceiverListener messageReceiverListener, ServerResponseDeliveryListener responseDeliveryListener, int pduProcessorDegree, PDUSender pduSender, PDUReader pduReader)
public BindRequest waitForBind(long timeout) throws java.lang.IllegalStateException, java.util.concurrent.TimeoutException
timeout
- is the timeout.BindRequest
.java.lang.IllegalStateException
- if this invocation of this method has been
made or invoke when state is not OPEN.java.util.concurrent.TimeoutException
- if the timeout has been reach and
SMPPServerSession
are no more valid because the
connection will be close automatically.public void deliverShortMessage(java.lang.String serviceType, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, java.lang.String sourceAddr, TypeOfNumber destAddrTon, NumberingPlanIndicator destAddrNpi, java.lang.String destinationAddr, ESMClass esmClass, byte protocoId, byte priorityFlag, RegisteredDelivery registeredDelivery, DataCoding dataCoding, byte[] shortMessage, OptionalParameter... optionalParameters) throws PDUException, ResponseTimeoutException, InvalidResponseException, NegativeResponseException, java.io.IOException
ServerSession
deliverShortMessage
in interface ServerSession
serviceType
- is the service_type.sourceAddrTon
- is the source_addr_ton.sourceAddrNpi
- is the source_addr_npi.sourceAddr
- is the source_addr.destAddrTon
- is the dest_addr_ton.destAddrNpi
- is the dest_addr_npi.destinationAddr
- is the destination_addr.esmClass
- is the esm_class.protocoId
- is the protocol_id.priorityFlag
- is the priority_flag.registeredDelivery
- is the registered_delivery.dataCoding
- is the data_coding.shortMessage
- is the short_message.optionalParameters
- is the optional parameters.PDUException
- if there is invalid PDU parameter found.ResponseTimeoutException
- if timeout has been reach.InvalidResponseException
- if response is invalid.NegativeResponseException
- if negative response received.java.io.IOException
- if there is an I/O error found.public void alertNotification(int sequenceNumber, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, java.lang.String sourceAddr, TypeOfNumber esmeAddrTon, NumberingPlanIndicator esmeAddrNpi, java.lang.String esmeAddr, OptionalParameter... optionalParameters) throws PDUStringException, java.io.IOException
ServerSession
alertNotification
in interface ServerSession
sequenceNumber
- is the sequence_number.sourceAddrTon
- is the source_addr_ton.sourceAddrNpi
- is the source_addr_npi.sourceAddr
- is the source_addr.esmeAddrTon
- is the esm_addr_ton.esmeAddrNpi
- is the esme_addr_npi.esmeAddr
- is the esme_addr.optionalParameters
- is the optional parameters.PDUStringException
- if there is invalid string found.java.io.IOException
- if there is an I/O error found.protected Connection connection()
connection
in class AbstractSession
protected AbstractSessionContext sessionContext()
sessionContext
in class AbstractSession
protected GenericMessageReceiverListener messageReceiverListener()
messageReceiverListener
in class AbstractSession
public ServerMessageReceiverListener getMessageReceiverListener()
public void setMessageReceiverListener(ServerMessageReceiverListener messageReceiverListener)
public void setResponseDeliveryListener(ServerResponseDeliveryListener responseDeliveryListener)