Class BindRequest
- java.lang.Object
-
- com.opencloud.slee.resources.smpp.pdu.ByteData
-
- com.opencloud.slee.resources.smpp.pdu.PDU
-
- com.opencloud.slee.resources.smpp.pdu.Request
-
- com.opencloud.slee.resources.smpp.pdu.BindRequest
-
- All Implemented Interfaces:
com.opencloud.util.FastSerializable
,Externalizable
,Serializable
- Direct Known Subclasses:
BindReceiver
,BindTransceiver
,BindTransmitter
public abstract class BindRequest extends Request
Common base class for bind_receiver, bind_transmitter and bind_tranceiver request PDUs- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.opencloud.slee.resources.smpp.pdu.PDU
commandID, commandStatus, MIN_SIZE, sequenceNumber
-
-
Constructor Summary
Constructors Modifier Constructor Description BindRequest(int commandID)
Create new bind request with default interface version, and NULL systemID, password, systemType and address fields.protected
BindRequest(DataInput in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
bodyEquals(PDU pdu)
Compares the body of given PDU with the body (not including header or TLVs) of this PDU for equality.protected void
bodyFromBuffer(ByteBuffer buf)
Read PDU body (not including header or TLVs) from a ByteBuffer.protected int
bodyHashCode()
Get the hash code value of PDU body (not including header or TLVs).protected int
bodySize()
Return size (in bytes) of PDU body (not including header or TLVs).protected void
bodyToBuffer(ByteBuffer buf)
Write PDU body (not including header or TLVs) to a ByteBuffer.protected String
bodyToString()
Address
getAddress()
byte
getInterfaceVersion()
String
getPassword()
String
getSystemID()
String
getSystemType()
void
setAddress(Address address)
void
setInterfaceVersion(byte version)
void
setPassword(String pass)
void
setSystemID(String id)
void
setSystemType(String type)
-
Methods inherited from class com.opencloud.slee.resources.smpp.pdu.Request
createResponse
-
Methods inherited from class com.opencloud.slee.resources.smpp.pdu.PDU
addTLV, equals, fromBuffer, fromStream, getAllTLVs, getCommandID, getCommandLength, getCommandStatus, getSequenceNumber, getTLV, hashCode, hasTLV, headerEquals, headerFromBuffer, headerHashCode, headerSize, headerToBuffer, headerToString, readExternal, setCommandID, setCommandStatus, setSequenceNumber, size, tlvEquals, tlvFromBuffer, tlvHashCode, tlvSize, tlvToBuffer, tlvToString, toBuffer, toStream, toString, writeExternal
-
Methods inherited from class com.opencloud.slee.resources.smpp.pdu.ByteData
checkCString, checkCString, checkDate, decodeUnsigned, encodeUnsigned, equalCStrings, getCString, getCString, getCStringByteArray, getCStringHashCode, isNullOrEmptyCString, printAsHex, putCString
-
-
-
-
Constructor Detail
-
BindRequest
public BindRequest(int commandID)
Create new bind request with default interface version, and NULL systemID, password, systemType and address fields.
-
BindRequest
protected BindRequest(DataInput in) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSystemID
public String getSystemID()
-
setSystemID
public void setSystemID(String id) throws SmppStringLengthException
- Throws:
SmppStringLengthException
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String pass) throws SmppStringLengthException
- Throws:
SmppStringLengthException
-
getSystemType
public String getSystemType()
-
setSystemType
public void setSystemType(String type) throws SmppStringLengthException
- Throws:
SmppStringLengthException
-
getInterfaceVersion
public byte getInterfaceVersion()
-
setInterfaceVersion
public void setInterfaceVersion(byte version)
-
getAddress
public Address getAddress()
-
setAddress
public void setAddress(Address address) throws SmppStringLengthException
- Throws:
SmppStringLengthException
-
bodyToBuffer
protected void bodyToBuffer(ByteBuffer buf) throws BufferOverflowException
Description copied from class:PDU
Write PDU body (not including header or TLVs) to a ByteBuffer. Subclasses MUST override this if they have any additional fields in their body. Fields must be written in big-endian byte order (the default with ByteBuffer anyway).- Overrides:
bodyToBuffer
in classPDU
- Throws:
BufferOverflowException
-
bodyFromBuffer
protected void bodyFromBuffer(ByteBuffer buf) throws BufferUnderflowException, InvalidPDUFieldException
Description copied from class:PDU
Read PDU body (not including header or TLVs) from a ByteBuffer. Subclasses MUST override this if they have any additional fields in their body. Fields are read in big-endian byte order (the default with ByteBuffer anyway).- Overrides:
bodyFromBuffer
in classPDU
- Throws:
BufferUnderflowException
InvalidPDUFieldException
-
bodyToString
protected String bodyToString()
- Overrides:
bodyToString
in classPDU
-
bodySize
protected int bodySize()
Description copied from class:PDU
Return size (in bytes) of PDU body (not including header or TLVs). Subclasses MUST override this if they have any additional fields in their body, so that PDU lengths will be calculated correctly.
-
bodyEquals
protected boolean bodyEquals(PDU pdu)
Description copied from class:PDU
Compares the body of given PDU with the body (not including header or TLVs) of this PDU for equality. Subclasses MUST override this if they have any additional fields in their body, so that PDUs comparison will be performed correctly.- Overrides:
bodyEquals
in classPDU
-
bodyHashCode
protected int bodyHashCode()
Description copied from class:PDU
Get the hash code value of PDU body (not including header or TLVs). Subclasses MUST override this if they have any additional fields in their body, so that PDU hash code will be calculated correctly.- Overrides:
bodyHashCode
in classPDU
-
-