mx.udlap.kjProtocol.packets
Class AckMessage

java.lang.Object
  extended bymx.udlap.kjProtocol.packets.BasicPacket
      extended bymx.udlap.kjProtocol.packets.AckMessage
All Implemented Interfaces:
BasicKannelProtocolMessage

public class AckMessage
extends BasicPacket
implements BasicKannelProtocolMessage

Kannel's protocol acknowledge message.

Author:
Oscar Medina Duarte

Field Summary
static int ACK_STAT_BUFFERED
           
static int ACK_STAT_FAILED
           
static int ACK_STAT_FAILED_TMP
           
static int ACK_STAT_SUCCESS
           
 
Fields inherited from class mx.udlap.kjProtocol.packets.BasicPacket
ACK_PKT, ADMIN_PKT, HEARTBEAT_PKT, length, NODATA, SMS_PKT, type, WDP_PKT
 
Constructor Summary
AckMessage(byte[] data)
           
AckMessage(int nack)
           
AckMessage(int nack, int time, java.lang.String uuid)
           
AckMessage(int nack, KUUID kuuid)
           
AckMessage(int nack, SMSPacketMessage smsMesage)
           
AckMessage(KUUID kuuid)
           
 
Method Summary
 byte[] getMessage()
          Gets the full message as an array of bytes as it would be sent over a TCP link.
 KInteger getNack()
           
 KTime getTime()
           
 KUUID getUuid()
           
 java.lang.String hexDump()
          Returns a Hex Editor style representation of the message
 void setMessage(byte[] data)
          Sets the message data to a message class as it would have been received from a TCP link.Sets the message attribute of the BasicKannelProtocolMessage object
 void setNack(KInteger nack)
           
 void setTime(KTime time)
           
 void setUuid(KUUID uuid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACK_STAT_SUCCESS

public static final int ACK_STAT_SUCCESS
See Also:
Constant Field Values

ACK_STAT_FAILED

public static final int ACK_STAT_FAILED
See Also:
Constant Field Values

ACK_STAT_FAILED_TMP

public static final int ACK_STAT_FAILED_TMP
See Also:
Constant Field Values

ACK_STAT_BUFFERED

public static final int ACK_STAT_BUFFERED
See Also:
Constant Field Values
Constructor Detail

AckMessage

public AckMessage(int nack)

AckMessage

public AckMessage(int nack,
                  int time,
                  java.lang.String uuid)

AckMessage

public AckMessage(byte[] data)
           throws PacketParseException

AckMessage

public AckMessage(int nack,
                  KUUID kuuid)

AckMessage

public AckMessage(KUUID kuuid)

AckMessage

public AckMessage(int nack,
                  SMSPacketMessage smsMesage)
Method Detail

getMessage

public byte[] getMessage()
Description copied from interface: BasicKannelProtocolMessage
Gets the full message as an array of bytes as it would be sent over a TCP link.

Specified by:
getMessage in interface BasicKannelProtocolMessage
Returns:
The message value

setMessage

public void setMessage(byte[] data)
                throws PacketParseException
Description copied from interface: BasicKannelProtocolMessage
Sets the message data to a message class as it would have been received from a TCP link.Sets the message attribute of the BasicKannelProtocolMessage object

Specified by:
setMessage in interface BasicKannelProtocolMessage
Parameters:
data - The new message value
Throws:
PacketParseException

hexDump

public java.lang.String hexDump()
Returns a Hex Editor style representation of the message

Returns:
String representation in Hex editor style

setNack

public void setNack(KInteger nack)

setTime

public void setTime(KTime time)

setUuid

public void setUuid(KUUID uuid)

getNack

public KInteger getNack()

getTime

public KTime getTime()

getUuid

public KUUID getUuid()