sg.edu.nus.protocol
Class Head

java.lang.Object
  extended by sg.edu.nus.protocol.Head
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Head
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Define the head of the message.

Version:
1.0 2006-1-4
Author:
Xu Linhao
See Also:
Serialized Form

Constructor Summary
Head()
          Constructor.
Head(int msgType)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clone self.
 int getMsgType()
          Get the message type of the head.
 void setMsgType(int msgType)
          Set the message type of the head.
 java.lang.String toString()
          Override toString() function of java.lang.Object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Head

public Head()
Constructor.


Head

public Head(int msgType)
Constructor.

Parameters:
msgType - the message type
Method Detail

clone

public java.lang.Object clone()
Clone self.

Overrides:
clone in class java.lang.Object
Returns:
The instance of Head.

setMsgType

public void setMsgType(int msgType)
Set the message type of the head.

Parameters:
msgType - the message type

getMsgType

public int getMsgType()
Get the message type of the head.

Returns:
the message type

toString

public java.lang.String toString()
Override toString() function of java.lang.Object.

Overrides:
toString in class java.lang.Object
Returns:
A string that describes the content of the body.