rice.pastry.wire.messaging.socket
Class HelloMessage

java.lang.Object
  extended byrice.pastry.wire.messaging.socket.SocketMessage
      extended byrice.pastry.wire.messaging.socket.SocketCommandMessage
          extended byrice.pastry.wire.messaging.socket.HelloMessage
All Implemented Interfaces:
java.io.Serializable

public class HelloMessage
extends SocketCommandMessage

Class which represents a greeting in the socket-based pastry protocol. It contains the InetSocketAddress and nodeId of the socket-initiating node.

See Also:
Serialized Form

Constructor Summary
HelloMessage(WirePastryNode pn, NodeId dest)
          Constructor
 
Method Summary
 java.net.InetSocketAddress getAddress()
          Returns the address of the source of this message.
 NodeId getDestination()
          Returns the NodeId of the source
 NodeId getNodeId()
          Returns the NodeId of the source
 HelloResponseMessage getResponse(WirePastryNode pn)
          Returns the appropriate response for this HelloMessage
 java.lang.String toString()
          DESCRIBE THE METHOD
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HelloMessage

public HelloMessage(WirePastryNode pn,
                    NodeId dest)
Constructor

Parameters:
pn - DESCRIBE THE PARAMETER
dest - DESCRIBE THE PARAMETER
Method Detail

getAddress

public java.net.InetSocketAddress getAddress()
Returns the address of the source of this message.

Returns:
The address of the source of the message.

getNodeId

public NodeId getNodeId()
Returns the NodeId of the source

Returns:
The NodeId of the source of this message.

getDestination

public NodeId getDestination()
Returns the NodeId of the source

Returns:
The NodeId of the source of this message.

getResponse

public HelloResponseMessage getResponse(WirePastryNode pn)
Returns the appropriate response for this HelloMessage

Parameters:
pn - The local pastry node
Returns:
A response message that should be sent to sender

toString

public java.lang.String toString()
DESCRIBE THE METHOD

Returns:
DESCRIBE THE RETURN VALUE





Imprint-Dataprotection