Constructor and Description |
---|
DefaultPDUSender()
Default constructor.
|
DefaultPDUSender(PDUComposer pduComposer)
Construct with specified PDU composer.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
sendAlertNotification(java.io.OutputStream os,
int sequenceNumber,
byte sourceAddrTon,
byte sourceAddrNpi,
java.lang.String sourceAddr,
byte esmeAddrTon,
byte esmeAddrNpi,
java.lang.String esmeAddr,
OptionalParameter... optionalParameters) |
byte[] |
sendBind(java.io.OutputStream os,
BindType bindType,
int sequenceNumber,
java.lang.String systemId,
java.lang.String password,
java.lang.String systemType,
InterfaceVersion interfaceVersion,
TypeOfNumber addrTon,
NumberingPlanIndicator addrNpi,
java.lang.String addressRange)
Send bind command.
|
byte[] |
sendBindResp(java.io.OutputStream os,
int commandId,
int sequenceNumber,
java.lang.String systemId)
Send bind response command.
|
byte[] |
sendCancelSm(java.io.OutputStream os,
int sequenceNumber,
java.lang.String serviceType,
java.lang.String messageId,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
java.lang.String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
java.lang.String destinationAddr)
Send cancel short message command.
|
byte[] |
sendCancelSmResp(java.io.OutputStream os,
int sequenceNumber)
Send cancel short message response command.
|
byte[] |
sendDataSm(java.io.OutputStream os,
int sequenceNumber,
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)
Send the data short message command.
|
byte[] |
sendDataSmResp(java.io.OutputStream os,
int sequenceNumber,
java.lang.String messageId,
OptionalParameter... optionalParameters)
Send data short message response command.
|
byte[] |
sendDeliverSm(java.io.OutputStream os,
int sequenceNumber,
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)
Send the deliver short message command.
|
byte[] |
sendDeliverSmResp(java.io.OutputStream os,
int sequenceNumber)
Send the deliver short message response.
|
byte[] |
sendEnquireLink(java.io.OutputStream os,
int sequenceNumber)
Send enquire link command.
|
byte[] |
sendEnquireLinkResp(java.io.OutputStream os,
int sequenceNumber)
Send enquire link response command.
|
byte[] |
sendGenericNack(java.io.OutputStream os,
int commandStatus,
int sequenceNumber)
Send generic non-acknowledge command.
|
byte[] |
sendHeader(java.io.OutputStream os,
int commandId,
int commandStatus,
int sequenceNumber)
Send only the PDU header.
|
byte[] |
sendQuerySm(java.io.OutputStream os,
int sequenceNumber,
java.lang.String messageId,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
java.lang.String sourceAddr)
Send query short message command.
|
byte[] |
sendQuerySmResp(java.io.OutputStream os,
int sequenceNumber,
java.lang.String messageId,
java.lang.String finalDate,
MessageState messageState,
byte errorCode)
Send query short message response command.
|
byte[] |
sendReplaceSm(java.io.OutputStream os,
int sequenceNumber,
java.lang.String messageId,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
java.lang.String sourceAddr,
java.lang.String scheduleDeliveryTime,
java.lang.String validityPeriod,
RegisteredDelivery registeredDelivery,
byte smDefaultMsgId,
byte[] shortMessage) |
byte[] |
sendReplaceSmResp(java.io.OutputStream os,
int sequenceNumber) |
byte[] |
sendSubmiMulti(java.io.OutputStream os,
int sequenceNumber,
java.lang.String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
java.lang.String sourceAddr,
DestinationAddress[] destinationAddresses,
ESMClass esmClass,
byte protocolId,
byte priorityFlag,
java.lang.String scheduleDeliveryTime,
java.lang.String validityPeriod,
RegisteredDelivery registeredDelivery,
ReplaceIfPresentFlag replaceIfPresentFlag,
DataCoding dataCoding,
byte smDefaultMsgId,
byte[] shortMessage,
OptionalParameter... optionalParameters) |
byte[] |
sendSubmitMultiResp(java.io.OutputStream os,
int sequenceNumber,
java.lang.String messageId,
UnsuccessDelivery... unsuccessDeliveries) |
byte[] |
sendSubmitSm(java.io.OutputStream os,
int sequenceNumber,
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,
java.lang.String scheduleDeliveryTime,
java.lang.String validityPeriod,
RegisteredDelivery registeredDelivery,
byte replaceIfPresent,
DataCoding dataCoding,
byte smDefaultMsgId,
byte[] shortMessage,
OptionalParameter... optionalParameters)
Send submit short message command.
|
byte[] |
sendSubmitSmResp(java.io.OutputStream os,
int sequenceNumber,
java.lang.String messageId)
Send submit short message response command.
|
byte[] |
sendUnbind(java.io.OutputStream os,
int sequenceNumber)
Send unbind command.
|
byte[] |
sendUnbindResp(java.io.OutputStream os,
int commandStatus,
int sequenceNumber)
Send unbind response command.
|
public DefaultPDUSender()
public DefaultPDUSender(PDUComposer pduComposer)
pduComposer
- is the PDU composer.public byte[] sendHeader(java.io.OutputStream os, int commandId, int commandStatus, int sequenceNumber) throws java.io.IOException
PDUSender
sendHeader
in interface PDUSender
os
- is the OutputStream
commandId
- is the SMPP command_id.commandStatus
- is the SMPP command_status.sequenceNumber
- is the SMPP sequence_number.java.io.IOException
- if an I/O error occur.public byte[] sendBind(java.io.OutputStream os, BindType bindType, int sequenceNumber, java.lang.String systemId, java.lang.String password, java.lang.String systemType, InterfaceVersion interfaceVersion, TypeOfNumber addrTon, NumberingPlanIndicator addrNpi, java.lang.String addressRange) throws PDUStringException, java.io.IOException
PDUSender
sendBind
in interface PDUSender
os
- is the OutputStream
bindType
- is the bind type that determine the command_id.sequenceNumber
- is the sequence_number.systemId
- is the system_id.password
- is the password.systemType
- is the system_type.interfaceVersion
- is the interface_version.addrTon
- is the addr_ton.addrNpi
- is the addr_npi.addressRange
- is the address_range.PDUStringException
- if there is an invalid string constraint found.java.io.IOException
- if an I/O error occur.public byte[] sendBindResp(java.io.OutputStream os, int commandId, int sequenceNumber, java.lang.String systemId) throws PDUStringException, java.io.IOException
PDUSender
sendBindResp
in interface PDUSender
os
- is the OutputStream
.commandId
- is the command_id.sequenceNumber
- is the sequence_number.systemId
- is the system_id.PDUStringException
java.io.IOException
- if an IO error occur.public byte[] sendUnbind(java.io.OutputStream os, int sequenceNumber) throws java.io.IOException
PDUSender
sendUnbind
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequence_number.java.io.IOException
- if an IO error occur.public byte[] sendGenericNack(java.io.OutputStream os, int commandStatus, int sequenceNumber) throws java.io.IOException
PDUSender
sendGenericNack
in interface PDUSender
os
- is the OutputStream
commandStatus
- is the command_status.sequenceNumber
- is the sequence_number.java.io.IOException
- if an IO error occur.public byte[] sendUnbindResp(java.io.OutputStream os, int commandStatus, int sequenceNumber) throws java.io.IOException
PDUSender
sendUnbindResp
in interface PDUSender
os
- is the OutputStream
.commandStatus
- is the command_status.sequenceNumber
- is the sequence_number.java.io.IOException
- if an IO error occur.public byte[] sendEnquireLink(java.io.OutputStream os, int sequenceNumber) throws java.io.IOException
PDUSender
sendEnquireLink
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequence_number.java.io.IOException
- if an IO error occur.public byte[] sendEnquireLinkResp(java.io.OutputStream os, int sequenceNumber) throws java.io.IOException
PDUSender
sendEnquireLinkResp
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequenceNumber.java.io.IOException
- if an IO error occur.public byte[] sendSubmitSm(java.io.OutputStream os, int sequenceNumber, 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, java.lang.String scheduleDeliveryTime, java.lang.String validityPeriod, RegisteredDelivery registeredDelivery, byte replaceIfPresent, DataCoding dataCoding, byte smDefaultMsgId, byte[] shortMessage, OptionalParameter... optionalParameters) throws PDUStringException, java.io.IOException
PDUSender
sendSubmitSm
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequence_number.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.scheduleDeliveryTime
- is the schedule_delivery_timevalidityPeriod
- is the validity_period.registeredDelivery
- is the registered_delivery.replaceIfPresent
- is the replace_if_present_flag.dataCoding
- is the data_coding.smDefaultMsgId
- is the sm_default_msg_id.shortMessage
- is the short_message.optionalParameters
- is the optional parameters.PDUStringException
- if there is an invalid string constraint
found.java.io.IOException
- if there is an IO error occur.public byte[] sendSubmitSmResp(java.io.OutputStream os, int sequenceNumber, java.lang.String messageId) throws PDUStringException, java.io.IOException
PDUSender
sendSubmitSmResp
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequence_number.messageId
- is the message_id.PDUStringException
- if there is an invalid string constraint
found.java.io.IOException
- if there is an IO error occur.public byte[] sendQuerySm(java.io.OutputStream os, int sequenceNumber, java.lang.String messageId, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, java.lang.String sourceAddr) throws PDUStringException, java.io.IOException
PDUSender
sendQuerySm
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequence_number.messageId
- is the message_id.sourceAddrTon
- is the source_addr_ton.sourceAddrNpi
- is the source_addr_npi.sourceAddr
- is the source_addr.PDUStringException
- if there is an invalid constraint found.java.io.IOException
- if there is an IO error occur.public byte[] sendQuerySmResp(java.io.OutputStream os, int sequenceNumber, java.lang.String messageId, java.lang.String finalDate, MessageState messageState, byte errorCode) throws PDUStringException, java.io.IOException
PDUSender
sendQuerySmResp
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequence_number.messageId
- is the message_id.finalDate
- is the final_date.messageState
- is the message_state.errorCode
- is the error_code.PDUStringException
- if there is an invalid constraint found.java.io.IOException
- if there is an IO error occur.public byte[] sendDeliverSm(java.io.OutputStream os, int sequenceNumber, 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 PDUStringException, java.io.IOException
PDUSender
sendDeliverSm
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- the sequence_number.serviceType
- 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.PDUStringException
- if there is an invalid string constraint
found.java.io.IOException
- if there is an IO error occur.public byte[] sendDeliverSmResp(java.io.OutputStream os, int sequenceNumber) throws java.io.IOException
PDUSender
sendDeliverSmResp
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequence_number.java.io.IOException
- if there is an IO error occur.public byte[] sendDataSm(java.io.OutputStream os, int sequenceNumber, 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 PDUStringException, java.io.IOException
PDUSender
sendDataSm
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- the sequence_number.serviceType
- 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.registeredDelivery
- is the registered_delivery.dataCoding
- is the data_coding.optionalParameters
- is the optional parameters.PDUStringException
- if there is an invalid string constraint
found.java.io.IOException
- if there is an IO error occur.public byte[] sendDataSmResp(java.io.OutputStream os, int sequenceNumber, java.lang.String messageId, OptionalParameter... optionalParameters) throws PDUStringException, java.io.IOException
PDUSender
sendDataSmResp
in interface PDUSender
os
- is the OutputStream
.sequenceNumber
- is the sequence_number.messageId
- is the message_id.optionalParameters
- is the optional parameters.PDUStringException
- if there is an invalid string constraint
found.java.io.IOException
- if there is an IO error occur.public byte[] sendCancelSm(java.io.OutputStream os, int sequenceNumber, java.lang.String serviceType, java.lang.String messageId, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, java.lang.String sourceAddr, TypeOfNumber destAddrTon, NumberingPlanIndicator destAddrNpi, java.lang.String destinationAddr) throws PDUStringException, java.io.IOException
PDUSender
sendCancelSm
in interface PDUSender
PDUStringException
java.io.IOException
public byte[] sendCancelSmResp(java.io.OutputStream os, int sequenceNumber) throws java.io.IOException
PDUSender
sendCancelSmResp
in interface PDUSender
java.io.IOException
public byte[] sendReplaceSm(java.io.OutputStream os, int sequenceNumber, java.lang.String messageId, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, java.lang.String sourceAddr, java.lang.String scheduleDeliveryTime, java.lang.String validityPeriod, RegisteredDelivery registeredDelivery, byte smDefaultMsgId, byte[] shortMessage) throws PDUStringException, java.io.IOException
sendReplaceSm
in interface PDUSender
PDUStringException
java.io.IOException
public byte[] sendReplaceSmResp(java.io.OutputStream os, int sequenceNumber) throws java.io.IOException
sendReplaceSmResp
in interface PDUSender
java.io.IOException
public byte[] sendSubmiMulti(java.io.OutputStream os, int sequenceNumber, java.lang.String serviceType, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, java.lang.String sourceAddr, DestinationAddress[] destinationAddresses, ESMClass esmClass, byte protocolId, byte priorityFlag, java.lang.String scheduleDeliveryTime, java.lang.String validityPeriod, RegisteredDelivery registeredDelivery, ReplaceIfPresentFlag replaceIfPresentFlag, DataCoding dataCoding, byte smDefaultMsgId, byte[] shortMessage, OptionalParameter... optionalParameters) throws PDUStringException, InvalidNumberOfDestinationsException, java.io.IOException
sendSubmiMulti
in interface PDUSender
PDUStringException
InvalidNumberOfDestinationsException
java.io.IOException
public byte[] sendSubmitMultiResp(java.io.OutputStream os, int sequenceNumber, java.lang.String messageId, UnsuccessDelivery... unsuccessDeliveries) throws PDUStringException, java.io.IOException
sendSubmitMultiResp
in interface PDUSender
PDUStringException
java.io.IOException
public byte[] sendAlertNotification(java.io.OutputStream os, int sequenceNumber, byte sourceAddrTon, byte sourceAddrNpi, java.lang.String sourceAddr, byte esmeAddrTon, byte esmeAddrNpi, java.lang.String esmeAddr, OptionalParameter... optionalParameters) throws PDUStringException, java.io.IOException
sendAlertNotification
in interface PDUSender
PDUStringException
java.io.IOException