sg.edu.nus.protocol.body
Class SPUpdateRoutingTableIndirectlyBody

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

public class SPUpdateRoutingTableIndirectlyBody
extends Body
implements java.io.Serializable

Implement the message body used for updating the routing table indirectly between two neighbor nodes via their parents

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

Constructor Summary
SPUpdateRoutingTableIndirectlyBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, RoutingItemInfo infoSender, RoutingItemInfo infoChild, int index, boolean direction, boolean special, LogicalInfo logicalDestination)
          Construct the message body with specified parameters.
SPUpdateRoutingTableIndirectlyBody(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 getInfoChild()
          Get information of the new node
 RoutingItemInfo getInfoSender()
          Get information of the sender node
 LogicalInfo getLogicalDestination()
          Get logical address of the receiver
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 PhysicalInfo getPhysicalSender()
          Get physical address of the sender
 boolean getSpecial()
          Get special flag
 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

SPUpdateRoutingTableIndirectlyBody

public SPUpdateRoutingTableIndirectlyBody(PhysicalInfo physicalSender,
                                          LogicalInfo logicalSender,
                                          RoutingItemInfo infoSender,
                                          RoutingItemInfo infoChild,
                                          int index,
                                          boolean direction,
                                          boolean special,
                                          LogicalInfo logicalDestination)
Construct the message body with specified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
infoSender - information of the sender
infoChild - information of the new node
index - index position of the sender inside routing table
direction - direction of the sender
special - false: update directly, true only update for the new node
logicalDestination - logical address of the receiver

SPUpdateRoutingTableIndirectlyBody

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

getInfoSender

public RoutingItemInfo getInfoSender()
Get information of the sender node

Returns:
information of the sender node

getInfoChild

public RoutingItemInfo getInfoChild()
Get information of the new node

Returns:
information of the new node

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

getSpecial

public boolean getSpecial()
Get special flag

Returns:
false: update directly, true only update for the new node

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