|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
Session describe all abilities of the session. Each created session will be
identified with session id and has a state (open, bound, unbound, closed).
Every changes of state will be notified and the event can be captured by
implementing SessionStateListener
and register it to a session
addSessionStateListener(SessionStateListener)
.
Commonly, every SMPP request has a response. The maximum waiting time can be configured as transaction timer.
To terminate the communication with the Message Center gracefully, invoke
unbindAndClose()
. It will send UNBIND command and close the
connection. This method will wait the UNIBIND_RESP but, negative response
will be acceptable and closing connection will be done immediately.
SessionState
Method Summary | |
---|---|
void |
addSessionStateListener(SessionStateListener l)
|
void |
close()
Forced close connection without sending UNBIND command to Message Center. |
DataSmResult |
dataShortMessage(java.lang.String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
java.lang.String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
java.lang.String destinationAddr,
ESMClass esmClass,
RegisteredDelivery registeredDelivery,
DataCoding dataCoding,
OptionalParameter... optionalParameters)
Sending a short message like SUBMIT_SM. |
int |
getEnquireLinkTimer()
|
long |
getLastActivityTimestamp()
Get the last reading valid PDU from remote host. |
java.lang.String |
getSessionId()
Get session id. |
SessionState |
getSessionState()
|
long |
getTransactionTimer()
|
void |
removeSessionStateListener(SessionStateListener l)
|
void |
setEnquireLinkTimer(int enquireLinkTimer)
|
void |
setTransactionTimer(long transactionTimer)
|
void |
unbindAndClose()
Sending UNBIND and close connection immediately. |
Method Detail |
---|
DataSmResult dataShortMessage(java.lang.String serviceType, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, java.lang.String sourceAddr, TypeOfNumber destAddrTon, NumberingPlanIndicator destAddrNpi, java.lang.String destinationAddr, ESMClass esmClass, RegisteredDelivery registeredDelivery, DataCoding dataCoding, OptionalParameter... optionalParameters) throws PDUException, ResponseTimeoutException, InvalidResponseException, NegativeResponseException, java.io.IOException
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_address.esmClass
- is the esm_class.registeredDelivery
- is the registered_delivery.dataCoding
- is the data_coding.optionalParameters
- is the optional parameters.
PDUException
- if there is invalid PDU parameter found.
ResponseTimeoutException
- if timeout has been reached.
InvalidResponseException
- if response is invalid.
NegativeResponseException
- if negative response received.
java.io.IOException
- if there is an I/O error found.java.lang.String getSessionId()
void setEnquireLinkTimer(int enquireLinkTimer)
int getEnquireLinkTimer()
void setTransactionTimer(long transactionTimer)
long getTransactionTimer()
SessionState getSessionState()
void addSessionStateListener(SessionStateListener l)
void removeSessionStateListener(SessionStateListener l)
long getLastActivityTimestamp()
void close()
void unbindAndClose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |