mx.udlap.kjProtocol.packets
Class HeartBeatKMessage

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

public class HeartBeatKMessage
extends BasicPacket
implements BasicKannelProtocolMessage

Kannel's protocol heart beat message.

Author:
Oscar Medina Duarte

Field Summary
 
Fields inherited from class mx.udlap.kjProtocol.packets.BasicPacket
ACK_PKT, ADMIN_PKT, HEARTBEAT_PKT, length, NODATA, SMS_PKT, type, WDP_PKT
 
Constructor Summary
HeartBeatKMessage()
          Constructor for the HeartBeatKMessage object
HeartBeatKMessage(byte[] data)
          Constructor for the HeartBeatKMessage object
HeartBeatKMessage(int load)
          Constructor for the HeartBeatKMessage object
 
Method Summary
 KInteger getLoad()
          Gets the load field attribute of the HeartBeatKMessage object
 byte[] getMessage()
          Gets the message bytes of the HeartBeatKMessage object
static void main(java.lang.String[] args)
           
 void setLoad(KInteger load)
          Sets the load field of the HeartBeatKMessage object
 void setMessage(byte[] data)
          Sets the message attribute of the HeartBeatKMessage object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeartBeatKMessage

public HeartBeatKMessage()
Constructor for the HeartBeatKMessage object


HeartBeatKMessage

public HeartBeatKMessage(int load)
Constructor for the HeartBeatKMessage object

Parameters:
load - Load field value.

HeartBeatKMessage

public HeartBeatKMessage(byte[] data)
                  throws PacketParseException
Constructor for the HeartBeatKMessage object

Parameters:
data - Byte array containing data of this type.
Method Detail

getMessage

public byte[] getMessage()
Gets the message bytes of the HeartBeatKMessage object

This is the actual message package to be sent over a tco link.

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

setMessage

public void setMessage(byte[] data)
                throws PacketParseException
Sets the message attribute of the HeartBeatKMessage object

This is the way to parse a packet received from a tcp link.

Specified by:
setMessage in interface BasicKannelProtocolMessage
Parameters:
data - The new message value
Throws:
PacketParseException - Exception thrown when parsing fails

setLoad

public void setLoad(KInteger load)
Sets the load field of the HeartBeatKMessage object

Parameters:
load - The new load field value

getLoad

public KInteger getLoad()
Gets the load field attribute of the HeartBeatKMessage object

Returns:
The load field value

main

public static void main(java.lang.String[] args)