sg.edu.nus.protocol.body
Class SPLIRoutingTableReplyBody

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

public class SPLIRoutingTableReplyBody
extends Body
implements java.io.Serializable

Implement the message body used for replying SPLIRoutingTable protocol

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

Field Summary
static boolean FROM_LEFT_TO_RIGHT
           
static boolean FROM_RIGHT_TO_LEFT
           
 
Constructor Summary
SPLIRoutingTableReplyBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, RoutingItemInfo infoRequester, int index, boolean direction, BoundaryValue oldMin, BoundaryValue oldMax, LogicalInfo logicalDestination)
          Construct the message body with specified parameters.
SPLIRoutingTableReplyBody(java.lang.String serializeData)
          Construct the message body with a string value.
 
Method Summary
 boolean getDirection()
          Get direction of the sender
 int getIndex()
          Get index of the sender in routing table
 RoutingItemInfo getInfoRequester()
          Get information of the sender
 LogicalInfo getLogicalDestination()
          Get logical address of the receiver
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 BoundaryValue getOldMax()
           
 BoundaryValue getOldMin()
           
 PhysicalInfo getPhysicalSender()
          Get physical address of the sender
 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
 

Field Detail

FROM_LEFT_TO_RIGHT

public static final boolean FROM_LEFT_TO_RIGHT
See Also:
Constant Field Values

FROM_RIGHT_TO_LEFT

public static final boolean FROM_RIGHT_TO_LEFT
See Also:
Constant Field Values
Constructor Detail

SPLIRoutingTableReplyBody

public SPLIRoutingTableReplyBody(PhysicalInfo physicalSender,
                                 LogicalInfo logicalSender,
                                 RoutingItemInfo infoRequester,
                                 int index,
                                 boolean direction,
                                 BoundaryValue oldMin,
                                 BoundaryValue oldMax,
                                 LogicalInfo logicalDestination)
Construct the message body with specified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
infoRequester - information of the sender
index - index of the sender in routing table
direction - direction of the sender
logicalDestination - logical address of the receiver

SPLIRoutingTableReplyBody

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

getInfoRequester

public RoutingItemInfo getInfoRequester()
Get information of the sender

Returns:
information of the sender

getIndex

public int getIndex()
Get index of the sender in routing table

Returns:
index of the sender

getDirection

public boolean getDirection()
Get direction of the sender

Returns:
direction of the sender

getOldMin

public BoundaryValue getOldMin()

getOldMax

public BoundaryValue getOldMax()

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