org.mobicents.protocols.smpp.message
Class QueryLastMsgsResp

java.lang.Object
  extended by org.mobicents.protocols.smpp.message.SMPPPacket
      extended by org.mobicents.protocols.smpp.message.QueryLastMsgsResp
All Implemented Interfaces:
Serializable, Cloneable

public class QueryLastMsgsResp
extends SMPPPacket

SMSC response to a QueryLastMsgs request.

Version:
$Id: QueryLastMsgsResp.java 457 2009-01-15 17:37:42Z orank $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mobicents.protocols.smpp.message.SMPPPacket
commandId, commandStatus, sequenceNum, tlvTable
 
Constructor Summary
QueryLastMsgsResp()
          Construct a new QueryLastMsgsResp.
QueryLastMsgsResp(SMPPPacket request)
          Create a new QueryLastMsgsResp packet in response to a BindReceiver.
 
Method Summary
 int addMessageId(String id)
          Add a message Id to the response packet.
 boolean equals(Object obj)
           
protected  int getMandatorySize()
          Get the encoded size of the mandatory parameters of this packet.
 String[] getMessageIds()
          Get a String array of the message Ids.
 int getMsgCount()
          Get the number of message Ids.
 int hashCode()
           
protected  void readMandatory(PacketDecoder decoder)
          Read the mandatory parameters from a packet decoder.
protected  void toString(StringBuilder buffer)
          Get the mandatory parameters in string form (for display purposes only).
protected  void writeMandatory(PacketEncoder encoder)
          Write the mandatory parameters to a packet encoder.
 
Methods inherited from class org.mobicents.protocols.smpp.message.SMPPPacket
clone, getCommandId, getCommandStatus, getLength, getSequenceNum, getTLV, getTLVTable, isRequest, isResponse, isSet, readFrom, removeTLV, safeCompare, setCommandStatus, setSequenceNum, setTLV, sizeOf, sizeOf, sizeOf, sizeOf, toString, validate, validateMandatory, validateTLVTable, writeTo, writeTo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryLastMsgsResp

public QueryLastMsgsResp()
Construct a new QueryLastMsgsResp.


QueryLastMsgsResp

public QueryLastMsgsResp(SMPPPacket request)
Create a new QueryLastMsgsResp packet in response to a BindReceiver. This constructor will set the sequence number to it's expected value.

Parameters:
request - The Request packet the response is to
Method Detail

addMessageId

public int addMessageId(String id)
Add a message Id to the response packet. A maximum of 255 message IDs can be added, since the size specifier for the encoded packet is only one byte. If an attempt is made to add more than 255 message IDs, this method will fail silently.

Parameters:
id - The message Id to add to the packet.
Returns:
The current number of message Ids (including the new one).

getMsgCount

public int getMsgCount()
Get the number of message Ids.


getMessageIds

public String[] getMessageIds()
Get a String array of the message Ids.

Returns:
A String array of all the message Ids. Will never return null, if the table is empty a zero-length array will be returned.

equals

public boolean equals(Object obj)
Overrides:
equals in class SMPPPacket

hashCode

public int hashCode()
Overrides:
hashCode in class SMPPPacket

toString

protected void toString(StringBuilder buffer)
Description copied from class: SMPPPacket
Get the mandatory parameters in string form (for display purposes only).

Overrides:
toString in class SMPPPacket

readMandatory

protected void readMandatory(PacketDecoder decoder)
Description copied from class: SMPPPacket
Read the mandatory parameters from a packet decoder. This default implementation is empty, parsing no mandatory parameters. Sub-classes may override this as they wish.

Overrides:
readMandatory in class SMPPPacket
Parameters:
decoder - The decoder to read fields from.

writeMandatory

protected void writeMandatory(PacketEncoder encoder)
                       throws IOException
Description copied from class: SMPPPacket
Write the mandatory parameters to a packet encoder.

Overrides:
writeMandatory in class SMPPPacket
Parameters:
encoder - The encoder to write mandatory parameters to.
Throws:
IOException - If an problem occurs while writing.

getMandatorySize

protected int getMandatorySize()
Description copied from class: SMPPPacket
Get the encoded size of the mandatory parameters of this packet.

Overrides:
getMandatorySize in class SMPPPacket
Returns:
The number of bytes the mandatory parameters will encode to.


Copyright © 2011 Mobicents. All Rights Reserved.