| Constructor and Description |
|---|
DefaultPDUSender()
Default constructor.
|
DefaultPDUSender(PDUComposer pduComposer)
Construct with specified PDU composer.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
sendAlertNotification(OutputStream os,
int sequenceNumber,
byte sourceAddrTon,
byte sourceAddrNpi,
String sourceAddr,
byte esmeAddrTon,
byte esmeAddrNpi,
String esmeAddr,
OptionalParameter... optionalParameters) |
byte[] |
sendBind(OutputStream os,
BindType bindType,
int sequenceNumber,
String systemId,
String password,
String systemType,
InterfaceVersion interfaceVersion,
TypeOfNumber addrTon,
NumberingPlanIndicator addrNpi,
String addressRange)
Send bind command.
|
byte[] |
sendBindResp(OutputStream os,
int commandId,
int sequenceNumber,
String systemId)
Send bind response command.
|
byte[] |
sendCancelSm(OutputStream os,
int sequenceNumber,
String serviceType,
String messageId,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
String destinationAddr)
Send cancel short message command.
|
byte[] |
sendCancelSmResp(OutputStream os,
int sequenceNumber)
Send cancel short message response command.
|
byte[] |
sendDataSm(OutputStream os,
int sequenceNumber,
String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
String destinationAddr,
ESMClass esmClass,
RegisteredDelivery registeredDelivery,
DataCoding dataCoding,
OptionalParameter... optionalParameters)
Send the data short message command.
|
byte[] |
sendDataSmResp(OutputStream os,
int sequenceNumber,
String messageId,
OptionalParameter... optionalParameters)
Send data short message response command.
|
byte[] |
sendDeliverSm(OutputStream os,
int sequenceNumber,
String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
String destinationAddr,
ESMClass esmClass,
byte protocoId,
byte priorityFlag,
RegisteredDelivery registeredDelivery,
DataCoding dataCoding,
byte[] shortMessage,
OptionalParameter... optionalParameters)
Send the deliver short message command.
|
byte[] |
sendDeliverSmResp(OutputStream os,
int sequenceNumber)
Send the deliver short message response.
|
byte[] |
sendEnquireLink(OutputStream os,
int sequenceNumber)
Send enquire link command.
|
byte[] |
sendEnquireLinkResp(OutputStream os,
int sequenceNumber)
Send enquire link response command.
|
byte[] |
sendGenericNack(OutputStream os,
int commandStatus,
int sequenceNumber)
Send generic non-acknowledge command.
|
byte[] |
sendHeader(OutputStream os,
int commandId,
int commandStatus,
int sequenceNumber)
Send only the PDU header.
|
byte[] |
sendQuerySm(OutputStream os,
int sequenceNumber,
String messageId,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr)
Send query short message command.
|
byte[] |
sendQuerySmResp(OutputStream os,
int sequenceNumber,
String messageId,
String finalDate,
MessageState messageState,
byte errorCode)
Send query short message response command.
|
byte[] |
sendReplaceSm(OutputStream os,
int sequenceNumber,
String messageId,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr,
String scheduleDeliveryTime,
String validityPeriod,
RegisteredDelivery registeredDelivery,
byte smDefaultMsgId,
byte[] shortMessage) |
byte[] |
sendReplaceSmResp(OutputStream os,
int sequenceNumber) |
byte[] |
sendSubmiMulti(OutputStream os,
int sequenceNumber,
String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr,
DestinationAddress[] destinationAddresses,
ESMClass esmClass,
byte protocolId,
byte priorityFlag,
String scheduleDeliveryTime,
String validityPeriod,
RegisteredDelivery registeredDelivery,
ReplaceIfPresentFlag replaceIfPresentFlag,
DataCoding dataCoding,
byte smDefaultMsgId,
byte[] shortMessage,
OptionalParameter... optionalParameters) |
byte[] |
sendSubmitMultiResp(OutputStream os,
int sequenceNumber,
String messageId,
UnsuccessDelivery... unsuccessDeliveries) |
byte[] |
sendSubmitSm(OutputStream os,
int sequenceNumber,
String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
String destinationAddr,
ESMClass esmClass,
byte protocoId,
byte priorityFlag,
String scheduleDeliveryTime,
String validityPeriod,
RegisteredDelivery registeredDelivery,
byte replaceIfPresent,
DataCoding dataCoding,
byte smDefaultMsgId,
byte[] shortMessage,
OptionalParameter... optionalParameters)
Send submit short message command.
|
byte[] |
sendSubmitSmResp(OutputStream os,
int sequenceNumber,
String messageId)
Send submit short message response command.
|
byte[] |
sendUnbind(OutputStream os,
int sequenceNumber)
Send unbind command.
|
byte[] |
sendUnbindResp(OutputStream os,
int commandStatus,
int sequenceNumber)
Send unbind response command.
|
public DefaultPDUSender()
public DefaultPDUSender(PDUComposer pduComposer)
pduComposer - is the PDU composer.public byte[] sendHeader(OutputStream os, int commandId, int commandStatus, int sequenceNumber) throws IOException
PDUSendersendHeader in interface PDUSenderos - is the OutputStreamcommandId - is the SMPP command_id.commandStatus - is the SMPP command_status.sequenceNumber - is the SMPP sequence_number.IOException - if an I/O error occur.public byte[] sendBind(OutputStream os, BindType bindType, int sequenceNumber, String systemId, String password, String systemType, InterfaceVersion interfaceVersion, TypeOfNumber addrTon, NumberingPlanIndicator addrNpi, String addressRange) throws PDUStringException, IOException
PDUSendersendBind in interface PDUSenderos - is the OutputStreambindType - 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.IOException - if an I/O error occur.public byte[] sendBindResp(OutputStream os, int commandId, int sequenceNumber, String systemId) throws PDUStringException, IOException
PDUSendersendBindResp in interface PDUSenderos - is the OutputStream.commandId - is the command_id.sequenceNumber - is the sequence_number.systemId - is the system_id.PDUStringExceptionIOException - if an IO error occur.public byte[] sendUnbind(OutputStream os, int sequenceNumber) throws IOException
PDUSendersendUnbind in interface PDUSenderos - is the OutputStream .sequenceNumber - is the sequence_number.IOException - if an IO error occur.public byte[] sendGenericNack(OutputStream os, int commandStatus, int sequenceNumber) throws IOException
PDUSendersendGenericNack in interface PDUSenderos - is the OutputStreamcommandStatus - is the command_status.sequenceNumber - is the sequence_number.IOException - if an IO error occur.public byte[] sendUnbindResp(OutputStream os, int commandStatus, int sequenceNumber) throws IOException
PDUSendersendUnbindResp in interface PDUSenderos - is the OutputStream.commandStatus - is the command_status.sequenceNumber - is the sequence_number.IOException - if an IO error occur.public byte[] sendEnquireLink(OutputStream os, int sequenceNumber) throws IOException
PDUSendersendEnquireLink in interface PDUSenderos - is the OutputStream.sequenceNumber - is the sequence_number.IOException - if an IO error occur.public byte[] sendEnquireLinkResp(OutputStream os, int sequenceNumber) throws IOException
PDUSendersendEnquireLinkResp in interface PDUSenderos - is the OutputStream.sequenceNumber - is the sequenceNumber.IOException - if an IO error occur.public byte[] sendSubmitSm(OutputStream os, int sequenceNumber, String serviceType, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr, TypeOfNumber destAddrTon, NumberingPlanIndicator destAddrNpi, String destinationAddr, ESMClass esmClass, byte protocoId, byte priorityFlag, String scheduleDeliveryTime, String validityPeriod, RegisteredDelivery registeredDelivery, byte replaceIfPresent, DataCoding dataCoding, byte smDefaultMsgId, byte[] shortMessage, OptionalParameter... optionalParameters) throws PDUStringException, IOException
PDUSendersendSubmitSm in interface PDUSenderos - 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.IOException - if there is an IO error occur.public byte[] sendSubmitSmResp(OutputStream os, int sequenceNumber, String messageId) throws PDUStringException, IOException
PDUSendersendSubmitSmResp in interface PDUSenderos - is the OutputStream.sequenceNumber - is the sequence_number.messageId - is the message_id.PDUStringException - if there is an invalid string constraint
found.IOException - if there is an IO error occur.public byte[] sendQuerySm(OutputStream os, int sequenceNumber, String messageId, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr) throws PDUStringException, IOException
PDUSendersendQuerySm in interface PDUSenderos - 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.IOException - if there is an IO error occur.public byte[] sendQuerySmResp(OutputStream os, int sequenceNumber, String messageId, String finalDate, MessageState messageState, byte errorCode) throws PDUStringException, IOException
PDUSendersendQuerySmResp in interface PDUSenderos - 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.IOException - if there is an IO error occur.public byte[] sendDeliverSm(OutputStream os, int sequenceNumber, String serviceType, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr, TypeOfNumber destAddrTon, NumberingPlanIndicator destAddrNpi, String destinationAddr, ESMClass esmClass, byte protocoId, byte priorityFlag, RegisteredDelivery registeredDelivery, DataCoding dataCoding, byte[] shortMessage, OptionalParameter... optionalParameters) throws PDUStringException, IOException
PDUSendersendDeliverSm in interface PDUSenderos - 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.IOException - if there is an IO error occur.public byte[] sendDeliverSmResp(OutputStream os, int sequenceNumber) throws IOException
PDUSendersendDeliverSmResp in interface PDUSenderos - is the OutputStream.sequenceNumber - is the sequence_number.IOException - if there is an IO error occur.public byte[] sendDataSm(OutputStream os, int sequenceNumber, String serviceType, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr, TypeOfNumber destAddrTon, NumberingPlanIndicator destAddrNpi, String destinationAddr, ESMClass esmClass, RegisteredDelivery registeredDelivery, DataCoding dataCoding, OptionalParameter... optionalParameters) throws PDUStringException, IOException
PDUSendersendDataSm in interface PDUSenderos - 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.IOException - if there is an IO error occur.public byte[] sendDataSmResp(OutputStream os, int sequenceNumber, String messageId, OptionalParameter... optionalParameters) throws PDUStringException, IOException
PDUSendersendDataSmResp in interface PDUSenderos - 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.IOException - if there is an IO error occur.public byte[] sendCancelSm(OutputStream os, int sequenceNumber, String serviceType, String messageId, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr, TypeOfNumber destAddrTon, NumberingPlanIndicator destAddrNpi, String destinationAddr) throws PDUStringException, IOException
PDUSendersendCancelSm in interface PDUSenderPDUStringExceptionIOExceptionpublic byte[] sendCancelSmResp(OutputStream os, int sequenceNumber) throws IOException
PDUSendersendCancelSmResp in interface PDUSenderIOExceptionpublic byte[] sendReplaceSm(OutputStream os, int sequenceNumber, String messageId, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr, String scheduleDeliveryTime, String validityPeriod, RegisteredDelivery registeredDelivery, byte smDefaultMsgId, byte[] shortMessage) throws PDUStringException, IOException
sendReplaceSm in interface PDUSenderPDUStringExceptionIOExceptionpublic byte[] sendReplaceSmResp(OutputStream os, int sequenceNumber) throws IOException
sendReplaceSmResp in interface PDUSenderIOExceptionpublic byte[] sendSubmiMulti(OutputStream os, int sequenceNumber, String serviceType, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr, DestinationAddress[] destinationAddresses, ESMClass esmClass, byte protocolId, byte priorityFlag, String scheduleDeliveryTime, String validityPeriod, RegisteredDelivery registeredDelivery, ReplaceIfPresentFlag replaceIfPresentFlag, DataCoding dataCoding, byte smDefaultMsgId, byte[] shortMessage, OptionalParameter... optionalParameters) throws PDUStringException, InvalidNumberOfDestinationsException, IOException
sendSubmiMulti in interface PDUSenderPDUStringExceptionInvalidNumberOfDestinationsExceptionIOExceptionpublic byte[] sendSubmitMultiResp(OutputStream os, int sequenceNumber, String messageId, UnsuccessDelivery... unsuccessDeliveries) throws PDUStringException, IOException
sendSubmitMultiResp in interface PDUSenderPDUStringExceptionIOExceptionpublic byte[] sendAlertNotification(OutputStream os, int sequenceNumber, byte sourceAddrTon, byte sourceAddrNpi, String sourceAddr, byte esmeAddrTon, byte esmeAddrNpi, String esmeAddr, OptionalParameter... optionalParameters) throws PDUStringException, IOException
sendAlertNotification in interface PDUSenderPDUStringExceptionIOException