sg.edu.nus.protocol.body
Class SPLeaveReplacementBody

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

public class SPLeaveReplacementBody
extends Body
implements java.io.Serializable

Implement the message body used for a leaving node to pass it position to the replacement node

Version:
1.0 2006-2-22
Author:
Vu Quang Hieu
See Also:
Serialized Form

Constructor Summary
SPLeaveReplacementBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, TreeNode treeNode, ContentInfo content)
          Construct the message body with specified parameters.
SPLeaveReplacementBody(java.lang.String serializeData)
          Construct the message body with a string value.
 
Method Summary
 ContentInfo getContent()
          Get stored data of the leaving node
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 PhysicalInfo getPhysicalSender()
          Get physical address of the sender
 java.lang.String getString()
          Return a readable string for testing or writing in the log file
 TreeNode getTreeNode()
          Get logical node in tree tree of the leaving node
 java.lang.String toString()
           
 
Methods inherited from class sg.edu.nus.protocol.body.Body
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SPLeaveReplacementBody

public SPLeaveReplacementBody(PhysicalInfo physicalSender,
                              LogicalInfo logicalSender,
                              TreeNode treeNode,
                              ContentInfo content)
Construct the message body with specified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
treeNode - logical node of the leaving node
content - stored data of the leaving node

SPLeaveReplacementBody

public SPLeaveReplacementBody(java.lang.String serializeData)
Construct the message body with a string value.

Parameters:
serializeData - the string value that contains the serialized message body
Method Detail

getPhysicalSender

public PhysicalInfo getPhysicalSender()
Get physical address of the sender

Returns:
physical address of the sender

getLogicalSender

public LogicalInfo getLogicalSender()
Get logical address of the sender

Returns:
logical address of the sender

getTreeNode

public TreeNode getTreeNode()
Get logical node in tree tree of the leaving node

Returns:
logical node information

getContent

public ContentInfo getContent()
Get stored data of the leaving node

Returns:
stored data of the leaving node

getString

public java.lang.String getString()
Return a readable string for testing or writing in the log file

Returns:
a readable string

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object