public class DataSM extends Request
Represents DATA_SM request PDU
commandID, commandStatus, MIN_SIZE, sequenceNumber
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() |
Response |
createResponse(int status)
Create a response of the appropriate type.
|
byte |
getDataCoding() |
Address |
getDestAddress() |
byte |
getEsmClass() |
byte |
getRegisteredDelivery() |
java.lang.String |
getServiceType() |
Address |
getSourceAddress() |
void |
setDataCoding(byte dataCoding) |
void |
setDestAddress(Address address) |
void |
setEsmClass(byte esmClass) |
void |
setRegisteredDelivery(byte registeredDelivery) |
void |
setServiceType(java.lang.String type) |
void |
setSourceAddress(Address address) |
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 DataSM()
public DataSM(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public java.lang.String getServiceType()
public void setServiceType(java.lang.String type) throws SmppStringLengthException
SmppStringLengthException
public Address getSourceAddress()
public void setSourceAddress(Address address) throws SmppStringLengthException
SmppStringLengthException
public Address getDestAddress()
public void setDestAddress(Address address) throws SmppStringLengthException
SmppStringLengthException
public byte getEsmClass()
public void setEsmClass(byte esmClass)
public byte getRegisteredDelivery()
public void setRegisteredDelivery(byte registeredDelivery)
public byte getDataCoding()
public void setDataCoding(byte dataCoding)
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
public Response createResponse(int status)
Request
Create a response of the appropriate type. Subclasses override to return correct type.
Implementations MUST set the response sequence number to be the same as the request sequence number.
createResponse
in class Request
status
- the value for the responses’ command_status field