sg.edu.nus.protocol.body
Class SPPassClientBody

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

public class SPPassClientBody
extends Body
implements java.io.Serializable

Implement the message body used for passing client peers when a node leaves the network

Version:
1.0 2006-3-5
Author:
Vu Quang Hieu
See Also:
Serialized Form

Constructor Summary
SPPassClientBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, PeerInfo[] attachedPeers, LogicalInfo logicalDestination)
          Construct the message body with specified parameters.
 
Method Summary
 PeerInfo[] getAttachedPeers()
          Get attached peers
 LogicalInfo getLogicalDestination()
          Get logical address of the receiver
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 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

SPPassClientBody

public SPPassClientBody(PhysicalInfo physicalSender,
                        LogicalInfo logicalSender,
                        PeerInfo[] attachedPeers,
                        LogicalInfo logicalDestination)
Construct the message body with specified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
attachedPeers - attached client peers wants to pass
logicalDestination - logical address of the receiver
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

getAttachedPeers

public PeerInfo[] getAttachedPeers()
Get attached peers

Returns:
a vector of attached peers

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