sg.edu.nus.protocol.body
Class SPLBGetLoadInfoReplyBody

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

public class SPLBGetLoadInfoReplyBody
extends Body
implements java.io.Serializable

Implement the message body used for replying workload information of a super peer to the requester

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

Constructor Summary
SPLBGetLoadInfoReplyBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, int numOfElement, int order, boolean direction, LogicalInfo logicalDestination)
          Construct the message body with speicified parameters.
SPLBGetLoadInfoReplyBody(java.lang.String serializeData)
          Construct the message body with a string value.
 
Method Summary
 boolean getDirection()
          Get direction of sending request
 LogicalInfo getLogicalDestination()
          Get logical address of the receiver
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 int getNumOfElement()
          Get number of stored item at the node
 int getOrder()
          Get order of the 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
 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

SPLBGetLoadInfoReplyBody

public SPLBGetLoadInfoReplyBody(PhysicalInfo physicalSender,
                                LogicalInfo logicalSender,
                                int numOfElement,
                                int order,
                                boolean direction,
                                LogicalInfo logicalDestination)
Construct the message body with speicified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
numOfElement - number of stored item
order - order of stored item
direction - direction of sending request
logicalDestination - logical address of the receiver

SPLBGetLoadInfoReplyBody

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

getNumOfElement

public int getNumOfElement()
Get number of stored item at the node

Returns:
number of stored item at the node

getOrder

public int getOrder()
Get order of the node

Returns:
order of the node

getDirection

public boolean getDirection()
Get direction of sending request

Returns:
direction of sending request

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