ie.omk.smpp.message
Class Bind

java.lang.Object
  extended by ie.omk.smpp.message.SMPPPacket
      extended by ie.omk.smpp.message.SMPPRequest
          extended by ie.omk.smpp.message.Bind
Direct Known Subclasses:
BindReceiver, BindTransceiver, BindTransmitter

public abstract class Bind
extends SMPPRequest

Abstract parent of BindTransmitter and BindReceiver.

Version:
1.0
Author:
Oran Kelly

Field Summary
 
Fields inherited from class ie.omk.smpp.message.SMPPRequest
isAckd
 
Fields inherited from class ie.omk.smpp.message.SMPPPacket
ALERT_NOTIFICATION, BIND_RECEIVER, BIND_RECEIVER_RESP, BIND_TRANSCEIVER, BIND_TRANSCEIVER_RESP, BIND_TRANSMITTER, BIND_TRANSMITTER_RESP, CANCEL_SM, CANCEL_SM_RESP, commandId, commandStatus, DATA_SM, DATA_SM_RESP, dataCoding, defaultMsg, DELIVER_SM, DELIVER_SM_RESP, deliveryTime, destination, ENQUIRE_LINK, ENQUIRE_LINK_RESP, errorCode, esmClass, ESME_ROK, expiryTime, finalDate, GENERIC_NACK, message, messageId, messageStatus, OUTBIND, PARAM_RETRIEVE, PARAM_RETRIEVE_RESP, priority, protocolID, QUERY_LAST_MSGS, QUERY_LAST_MSGS_RESP, QUERY_MSG_DETAILS, QUERY_MSG_DETAILS_RESP, QUERY_SM, QUERY_SM_RESP, registered, REPLACE_SM, REPLACE_SM_RESP, replaceIfPresent, sequenceNum, serviceType, SM_STATE_ACCEPTED, SM_STATE_DELETED, SM_STATE_DELIVERED, SM_STATE_EN_ROUTE, SM_STATE_EXPIRED, SM_STATE_INVALID, SM_STATE_UNDELIVERABLE, SMC_CAS_DL, SMC_DEFMSG, SMC_DLIST, SMC_ESCALATED, SMC_LOOPBACK_RECEIPT, SMC_MCE, SMC_MO, SMC_MOMT, SMC_MT, SMC_MULTI, SMC_RECEIPT, SMC_RECEIPT_SWAP, SMC_STORE, SMC_STORE_FORWARD, SMC_SUBMIT_REPLACE, source, SUBMIT_MULTI, SUBMIT_MULTI_RESP, SUBMIT_SM, SUBMIT_SM_RESP, tlvTable, UNBIND, UNBIND_RESP, version
 
Constructor Summary
Bind(int id)
           
 
Method Summary
protected  void encodeBody(OutputStream out)
          Write the byte representation of this packet to an OutputStream.
 int getAddressNpi()
          Get the Numbering plan indicator
 String getAddressRange()
          Get the routing address regular expression
 int getAddressTon()
          Get the Type of number
 int getBodyLength()
          Return the number of bytes this packet would be encoded as to an OutputStream.
 int getInterfaceVersion()
          Get the interface version
 String getPassword()
          Get the authentication password
 String getSystemId()
          Get the system Id
 String getSystemType()
          Get the current system type
 void readBodyFrom(byte[] body, int offset)
          Read this packet's mandatory parameters from a byte array.
 void setAddressNpi(int addrNpi)
          Set the message routing Npi for this transmitter
 void setAddressRange(String addressRange)
          Set the message routing address range for this transmitter
 void setAddressTon(int addrTon)
          Set the message routing Ton for this transmitter
 void setPassword(String password)
          Set the password for this transmitter
 void setSystemId(String sysId)
          Set the system Id
 void setSystemType(String sysType)
          Set the system type for this transmitter
 String toString()
          Convert this packet to a String.
 
Methods inherited from class ie.omk.smpp.message.SMPPRequest
ack, isAckd, isRequest
 
Methods inherited from class ie.omk.smpp.message.SMPPPacket
getCommandId, getCommandLen, getCommandStatus, getDataCoding, getDefaultMsg, getDefaultMsgId, getDeliveryTime, getDestination, getErrorCode, getEsmClass, getExpiryTime, getFinalDate, getLength, getMessage, getMessageEncoding, getMessageId, getMessageLen, getMessageStatus, getMessageText, getMessageText, getOptionalParameter, getPriority, getProtocolId, getProtocolID, getRegistered, getReplaceIfPresent, getSequenceNum, getServiceType, getSource, getTLVTable, getVersion, isPriority, isRegistered, isReplaceIfPresent, isSet, readFrom, setAlphabet, setAlphabet, setDataCoding, setDefaultMsg, setDeliveryTime, setDeliveryTime, setDestination, setErrorCode, setEsmClass, setExpiryTime, setExpiryTime, setFinalDate, setFinalDate, setMessage, setMessage, setMessage, setMessageEncoding, setMessageId, setMessageStatus, setMessageText, setMessageText, setOptionalParameter, setPriority, setProtocolId, setProtocolID, setRegistered, setRegistered, setReplaceIfPresent, setReplaceIfPresent, setSequenceNum, setServiceType, setSource, setTLVTable, setVersion, writeTo, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bind

public Bind(int id)
Method Detail

setSystemId

public void setSystemId(String sysId)
                 throws InvalidParameterValueException
Set the system Id

Parameters:
sysId - The System Id to use (Up to 15 characters)
Throws:
InvalidParameterValueException - If the system ID fails version validation.

setPassword

public void setPassword(String password)
                 throws InvalidParameterValueException
Set the password for this transmitter

Parameters:
password - The new password to use (Up to 8 characters in length)
Throws:
InvalidParameterValueException - If the password fails version validation.

setSystemType

public void setSystemType(String sysType)
                   throws InvalidParameterValueException
Set the system type for this transmitter

Parameters:
sysType - The new system type (Up to 12 characters in length)
Throws:
InvalidParameterValueException - If the system type fails version validation.

setAddressTon

public void setAddressTon(int addrTon)
                   throws InvalidParameterValueException
Set the message routing Ton for this transmitter

Parameters:
addrTon - The new Type Of Number to use
Throws:
InvalidParameterValueException - If the TON fails version validation.

setAddressNpi

public void setAddressNpi(int addrNpi)
                   throws InvalidParameterValueException
Set the message routing Npi for this transmitter

Parameters:
addrNpi - The new Numbering plan indicator to use
Throws:
InvalidParameterValueException - If the NPI fails version validation.

setAddressRange

public void setAddressRange(String addressRange)
                     throws InvalidParameterValueException
Set the message routing address range for this transmitter

Parameters:
addressRange - The new address range to use (Up to 40 characters)
Throws:
InvalidParameterValueException - If the address range fails version validation.

getSystemId

public String getSystemId()
Get the system Id


getPassword

public String getPassword()
Get the authentication password


getSystemType

public String getSystemType()
Get the current system type


getAddressRange

public String getAddressRange()
Get the routing address regular expression


getAddressTon

public int getAddressTon()
Get the Type of number


getAddressNpi

public int getAddressNpi()
Get the Numbering plan indicator


getInterfaceVersion

public int getInterfaceVersion()
Get the interface version


getBodyLength

public int getBodyLength()
Return the number of bytes this packet would be encoded as to an OutputStream.

Specified by:
getBodyLength in class SMPPPacket
Returns:
the number of bytes this packet would encode as.

encodeBody

protected void encodeBody(OutputStream out)
                   throws IOException
Write the byte representation of this packet to an OutputStream.

Overrides:
encodeBody in class SMPPPacket
Parameters:
out - The output stream to write to
Throws:
IOException - If there is an error writing to the stream.

readBodyFrom

public void readBodyFrom(byte[] body,
                         int offset)
                  throws SMPPProtocolException
Description copied from class: SMPPPacket
Read this packet's mandatory parameters from a byte array.

Specified by:
readBodyFrom in class SMPPPacket
Parameters:
body - the byte array to read the mandatory parameters from.
offset - the offset into b that the mandatory parameter's begin at.
Throws:
SMPPProtocolException - if there is an error parsing the packet fields.

toString

public String toString()
Convert this packet to a String. Not to be interpreted programmatically, it's just dead handy for debugging!

Overrides:
toString in class SMPPPacket


Copyright © 2011 smppapi at Sourceforge. All Rights Reserved.