sg.edu.nus.protocol.body
Class SPLeaveFindReplacementNodeBody

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

public class SPLeaveFindReplacementNodeBody
extends Body
implements java.io.Serializable

Implement the message body used for finding a leaf node to replace the position of the leaving node

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

Constructor Summary
SPLeaveFindReplacementNodeBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, PhysicalInfo physicalRequester, LogicalInfo logicalRequester, LogicalInfo logicalDestination)
          Construct the message body with specified parameters.
SPLeaveFindReplacementNodeBody(java.lang.String serializeData)
          Construct the message body with a string value.
 
Method Summary
 LogicalInfo getLogicalDestination()
          Get logical address of the receiver
 LogicalInfo getLogicalRequester()
          Get logical address of the leaving node
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 PhysicalInfo getPhysicalRequester()
          Get physical address of the leaving node
 PhysicalInfo getPhysicalSender()
          Get physical address of the sender
 java.lang.String getString()
          Return a readable string for testing or writing in the log file
 void setLogicalDestination(LogicalInfo logicalDestination)
          Update logical address of the receiver
 void setLogicalSender(LogicalInfo logicalSender)
          Update logical address of the sender
 void setPhysicalSender(PhysicalInfo physicalSender)
          Update physical address of the sender
 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

SPLeaveFindReplacementNodeBody

public SPLeaveFindReplacementNodeBody(PhysicalInfo physicalSender,
                                      LogicalInfo logicalSender,
                                      PhysicalInfo physicalRequester,
                                      LogicalInfo logicalRequester,
                                      LogicalInfo logicalDestination)
Construct the message body with specified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
physicalRequester - physical address of the leaving node
logicalRequester - logical address of the leaving node
logicalDestination - logical address of the receiver

SPLeaveFindReplacementNodeBody

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

setPhysicalSender

public void setPhysicalSender(PhysicalInfo physicalSender)
Update physical address of the sender

Parameters:
physicalSender - physical address of the sender

getPhysicalSender

public PhysicalInfo getPhysicalSender()
Get physical address of the sender

Returns:
physical address of the sender

setLogicalSender

public void setLogicalSender(LogicalInfo logicalSender)
Update logical address of the sender

Parameters:
logicalSender -

getLogicalSender

public LogicalInfo getLogicalSender()
Get logical address of the sender

Returns:
logical address of the sender

getPhysicalRequester

public PhysicalInfo getPhysicalRequester()
Get physical address of the leaving node

Returns:
physical address of the leaving node

getLogicalRequester

public LogicalInfo getLogicalRequester()
Get logical address of the leaving node

Returns:
logical address of the leaving node

setLogicalDestination

public void setLogicalDestination(LogicalInfo logicalDestination)
Update logical address of the receiver

Parameters:
logicalDestination - logical address of the receiver

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