sg.edu.nus.protocol.body
Class SPJoinSplitDataBody

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

public class SPJoinSplitDataBody
extends Body
implements java.io.Serializable

Implement the message body used for splitting the range and values of an left adjacent super peer when a new node joins as a left child of an existing node

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

Constructor Summary
SPJoinSplitDataBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, PhysicalInfo physicalNewNode, LogicalInfo logicalNewNode, int numberOfExpectedRTReply, RoutingTableInfo leftRT, RoutingTableInfo rightRT, RoutingItemInfo parentNodeInfo, ChildNodeInfo rightChildInfo, LogicalInfo logicalDestination)
          Construct the message body with specified parameters.
SPJoinSplitDataBody(java.lang.String serializeData)
          Construct the message body with a string value.
 
Method Summary
 RoutingTableInfo getLeftRT()
          Get left routing table information
 LogicalInfo getLogicalDestination()
          Get logical address of the receiver
 LogicalInfo getLogicalNewNode()
          Get logical address of the new node
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 int getNumberOfExpectedRTReply()
          Get number of expected routing table reply
 RoutingItemInfo getParentNodeInfo()
          Get parent information
 PhysicalInfo getPhysicalNewNode()
          Get physical address of the new node
 PhysicalInfo getPhysicalSender()
          Get physical address of the sender
 ChildNodeInfo getRightChildInfo()
          Get right child information
 RoutingTableInfo getRightRT()
          Get right routing table information
 java.lang.String getString()
          Return a readable string for testing or writing in the log file
 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

SPJoinSplitDataBody

public SPJoinSplitDataBody(PhysicalInfo physicalSender,
                           LogicalInfo logicalSender,
                           PhysicalInfo physicalNewNode,
                           LogicalInfo logicalNewNode,
                           int numberOfExpectedRTReply,
                           RoutingTableInfo leftRT,
                           RoutingTableInfo rightRT,
                           RoutingItemInfo parentNodeInfo,
                           ChildNodeInfo rightChildInfo,
                           LogicalInfo logicalDestination)
Construct the message body with specified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
physicalNewNode - physical address of the new node
logicalNewNode - logical address of the new node
numberOfExpectedRTReply - number of expected routing table reply, which should be received by the new node
leftRT - left routing table information of the new node
rightRT - right routing table information of the new node
parentNodeInfo - parent information of the new node
logicalDestination - logical address of the receiver

SPJoinSplitDataBody

public SPJoinSplitDataBody(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

getPhysicalNewNode

public PhysicalInfo getPhysicalNewNode()
Get physical address of the new node

Returns:
physical address of the new node

getLogicalNewNode

public LogicalInfo getLogicalNewNode()
Get logical address of the new node

Returns:
logical address of the new node

getNumberOfExpectedRTReply

public int getNumberOfExpectedRTReply()
Get number of expected routing table reply

Returns:
number of expected routing table reply, which should be received by the new node

getLeftRT

public RoutingTableInfo getLeftRT()
Get left routing table information

Returns:
left routing table information

getRightRT

public RoutingTableInfo getRightRT()
Get right routing table information

Returns:
right routing table information

getParentNodeInfo

public RoutingItemInfo getParentNodeInfo()
Get parent information

Returns:
parent information

getRightChildInfo

public ChildNodeInfo getRightChildInfo()
Get right child information

Returns:

getLogicalDestination

public LogicalInfo getLogicalDestination()
Get logical address of the receiver

Returns:
logical address of the receiver

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