org.jsmpp.session
Class AbstractSMPPOperation
java.lang.Object
org.jsmpp.session.AbstractSMPPOperation
- All Implemented Interfaces:
- SMPPOperation
- Direct Known Subclasses:
- DefaultSMPPClientOperation, DefaultSMPPServerOperation
public abstract class AbstractSMPPOperation
- extends java.lang.Object
- implements SMPPOperation
- Author:
- uudashr
Method Summary |
protected Connection |
connection()
|
DataSmResult |
dataSm(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)
|
void |
dataSmResp(int sequenceNumber,
java.lang.String messageId,
OptionalParameter... optionalParameters)
|
void |
enquireLink()
|
void |
enquireLinkResp(int sequenceNumber)
|
protected Command |
executeSendCommand(SendCommandTask task,
long timeout)
Execute send command command task. |
void |
genericNack(int commandStatus,
int sequenceNumber)
|
long |
getTransactionTimer()
|
protected PDUSender |
pduSender()
|
void |
setTransactionTimer(long transactionTimer)
|
void |
unbind()
|
void |
unbindResp(int sequenceNumber)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSMPPOperation
public AbstractSMPPOperation(Connection connection,
PDUSender pduSender)
pduSender
protected PDUSender pduSender()
connection
protected Connection connection()
setTransactionTimer
public void setTransactionTimer(long transactionTimer)
getTransactionTimer
public long getTransactionTimer()
executeSendCommand
protected Command executeSendCommand(SendCommandTask task,
long timeout)
throws PDUException,
ResponseTimeoutException,
InvalidResponseException,
NegativeResponseException,
java.io.IOException
- Execute send command command task.
- Parameters:
task
- is the task.timeout
- is the timeout in millisecond.
- Returns:
- the command response.
- Throws:
PDUException
- if there is invalid PDU parameter found.
ResponseTimeoutException
- if the response has reach it timeout.
InvalidResponseException
- if invalid response found.
NegativeResponseException
- if the negative response found.
java.io.IOException
- if there is an IO error found.
unbind
public void unbind()
throws ResponseTimeoutException,
InvalidResponseException,
java.io.IOException
- Specified by:
unbind
in interface SMPPOperation
- Throws:
ResponseTimeoutException
InvalidResponseException
java.io.IOException
unbindResp
public void unbindResp(int sequenceNumber)
throws java.io.IOException
- Specified by:
unbindResp
in interface SMPPOperation
- Throws:
java.io.IOException
dataSm
public DataSmResult dataSm(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
- Specified by:
dataSm
in interface SMPPOperation
- Throws:
PDUException
ResponseTimeoutException
InvalidResponseException
NegativeResponseException
java.io.IOException
dataSmResp
public void dataSmResp(int sequenceNumber,
java.lang.String messageId,
OptionalParameter... optionalParameters)
throws PDUStringException,
java.io.IOException
- Specified by:
dataSmResp
in interface SMPPOperation
- Throws:
PDUStringException
java.io.IOException
enquireLink
public void enquireLink()
throws ResponseTimeoutException,
InvalidResponseException,
java.io.IOException
- Specified by:
enquireLink
in interface SMPPOperation
- Throws:
ResponseTimeoutException
InvalidResponseException
java.io.IOException
enquireLinkResp
public void enquireLinkResp(int sequenceNumber)
throws java.io.IOException
- Specified by:
enquireLinkResp
in interface SMPPOperation
- Throws:
java.io.IOException
genericNack
public void genericNack(int commandStatus,
int sequenceNumber)
throws java.io.IOException
- Specified by:
genericNack
in interface SMPPOperation
- Throws:
java.io.IOException