sg.edu.nus.protocol.body
Class SPLIRoutingTableBody

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

public class SPLIRoutingTableBody
extends Body
implements java.io.Serializable

Implement the message body used for looking routing table info in case of node failure

Version:
1.0 2006-12-03
Author:
Vu Quang Hieu
See Also:
Serialized Form

Field Summary
static boolean FROM_LEFT_TO_RIGHT
           
static boolean FROM_RIGHT_TO_LEFT
           
 
Constructor Summary
SPLIRoutingTableBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, PhysicalInfo physicalRequester, LogicalInfo logicalRequester, LogicalInfo logicalFailedNode, int index, boolean direction, LogicalInfo logicalDestination)
          Construct the message body with speicified parameters.
SPLIRoutingTableBody(java.lang.String serializeData)
          Construct the message body with a string value.
 
Method Summary
 boolean getDirection()
          Get direction of the new node
 int getIndex()
          Get index of the new node inside routing table
 LogicalInfo getLogicalDestination()
          Get logical address of the receiver
 LogicalInfo getLogicalFailedNode()
          Get logical address of the failed node
 LogicalInfo getLogicalRequester()
           
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 PhysicalInfo getPhysicalRequester()
           
 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 setIndex(int index)
           
 void setLogicalDestination(LogicalInfo logicalDestination)
          Set logical address of the receiver
 void setLogicalSender(LogicalInfo logicalSender)
           
 void setPhysicalSender(PhysicalInfo physicalSender)
           
 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

SPLIRoutingTableBody

public SPLIRoutingTableBody(PhysicalInfo physicalSender,
                            LogicalInfo logicalSender,
                            PhysicalInfo physicalRequester,
                            LogicalInfo logicalRequester,
                            LogicalInfo logicalFailedNode,
                            int index,
                            boolean direction,
                            LogicalInfo logicalDestination)
Construct the message body with speicified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
physicalRequester - physical address of the requester
logicalRequester - logical address of the requester
logicalFailedNode - logical address of the failed node
index - position of the new node in the routing table
direction - direction of the new node
logicalDestination - logical address of the receiver

SPLIRoutingTableBody

public SPLIRoutingTableBody(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)

getPhysicalSender

public PhysicalInfo getPhysicalSender()
Get physical address of the sender

Returns:
physical address of the sender

setLogicalSender

public void setLogicalSender(LogicalInfo logicalSender)

getLogicalSender

public LogicalInfo getLogicalSender()
Get logical address of the sender

Returns:
logical address of the sender

getPhysicalRequester

public PhysicalInfo getPhysicalRequester()

getLogicalRequester

public LogicalInfo getLogicalRequester()

getLogicalFailedNode

public LogicalInfo getLogicalFailedNode()
Get logical address of the failed node

Returns:
logical address of the failed node

setIndex

public void setIndex(int index)

getIndex

public int getIndex()
Get index of the new node inside routing table

Returns:
index of the new node

getDirection

public boolean getDirection()
Get direction of the new node

Returns:
direction of the new node

setLogicalDestination

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

Parameters:
logicalDestination -

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