public abstract class BindRequest extends Request
Common base class for bind_receiver, bind_transmitter and bind_tranceiver request PDUs
commandID, commandStatus, MIN_SIZE, sequenceNumber
Modifier | Constructor and Description |
---|---|
protected |
BindRequest(java.io.DataInput in) |
|
BindRequest(int commandID)
Create new bind request with default interface version, and NULL systemID, password, systemType and address fields.
|
Modifier and Type | Method and 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(java.nio.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(java.nio.ByteBuffer buf)
Write PDU body (not including header or TLVs) to a ByteBuffer.
|
protected java.lang.String |
bodyToString() |
Address |
getAddress() |
byte |
getInterfaceVersion() |
java.lang.String |
getPassword() |
java.lang.String |
getSystemID() |
java.lang.String |
getSystemType() |
void |
setAddress(Address address) |
void |
setInterfaceVersion(byte version) |
void |
setPassword(java.lang.String pass) |
void |
setSystemID(java.lang.String id) |
void |
setSystemType(java.lang.String type) |
createResponse
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
checkCString, checkCString, checkDate, decodeUnsigned, encodeUnsigned, equalCStrings, getCString, getCString, getCStringByteArray, getCStringHashCode, isNullOrEmptyCString, printAsHex, putCString
public BindRequest(int commandID)
Create new bind request with default interface version, and NULL systemID, password, systemType and address fields.
protected BindRequest(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public java.lang.String getSystemID()
public void setSystemID(java.lang.String id) throws SmppStringLengthException
SmppStringLengthException
public java.lang.String getPassword()
public void setPassword(java.lang.String pass) throws SmppStringLengthException
SmppStringLengthException
public java.lang.String getSystemType()
public void setSystemType(java.lang.String type) throws SmppStringLengthException
SmppStringLengthException
public byte getInterfaceVersion()
public void setInterfaceVersion(byte version)
public Address getAddress()
public void setAddress(Address address) throws SmppStringLengthException
SmppStringLengthException
protected void bodyToBuffer(java.nio.ByteBuffer buf) throws java.nio.BufferOverflowException
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).
bodyToBuffer
in class PDU
java.nio.BufferOverflowException
protected void bodyFromBuffer(java.nio.ByteBuffer buf) throws java.nio.BufferUnderflowException, InvalidPDUFieldException
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).
bodyFromBuffer
in class PDU
java.nio.BufferUnderflowException
InvalidPDUFieldException
protected java.lang.String bodyToString()
bodyToString
in class PDU
protected int bodySize()
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.
protected boolean bodyEquals(PDU pdu)
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.
bodyEquals
in class PDU
protected int bodyHashCode()
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.
bodyHashCode
in class PDU