ePOST API

rice.pastry.join
Class JoinRequest

java.lang.Object
  extended by rice.pastry.messaging.Message
      extended by rice.pastry.join.JoinRequest
All Implemented Interfaces:
java.io.Serializable

public class JoinRequest
extends Message
implements java.io.Serializable

Request to join this network.

Version:
$Id: JoinRequest.java 2618 2005-06-29 18:01:42Z jstewart $
Author:
Andrew Ladd
See Also:
Serialized Form

Field Summary
 
Fields inherited from class rice.pastry.messaging.Message
DEFAULT_PRIORITY_LEVEL
 
Constructor Summary
JoinRequest(NodeHandle nh, Credentials cred, java.util.Date stamp, int rtBase)
          Constructor.
JoinRequest(NodeHandle nh, Credentials cred, int rtBase)
          Constructor.
JoinRequest(NodeHandle nh, java.util.Date stamp, int rtBase)
          Constructor.
JoinRequest(NodeHandle nh, int rtBase)
          Constructor.
 
Method Summary
 boolean accepted()
          Returns true if the request was accepted, false if it hasn't yet.
 void acceptJoin(NodeHandle nh, LeafSet ls)
          Accept join request.
 NodeHandle getHandle()
          Gets the handle of the node trying to join.
 NodeHandle getJoinHandle()
          Gets the handle of the node that accepted the join request;
 LeafSet getLeafSet()
          Gets the leafset of the node that accepted the join request;
 RouteSet[] getRow(int i)
          Get row.
 int lastRow()
          Returns the number of rows left to determine (in order).
 int numRows()
          Get the number of rows.
 void pushRow(RouteSet[] row)
          Push row.
 java.lang.String toString()
           
 
Methods inherited from class rice.pastry.messaging.Message
getCredentials, getDate, getDestination, getPriority, getSender, getSenderId, setPriority, setSender, stamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoinRequest

public JoinRequest(NodeHandle nh,
                   int rtBase)
Constructor.

Parameters:
nh - a handle of the node trying to join the network.

JoinRequest

public JoinRequest(NodeHandle nh,
                   java.util.Date stamp,
                   int rtBase)
Constructor.

Parameters:
nh - a handle of the node trying to join the network.
stamp - the timestamp

JoinRequest

public JoinRequest(NodeHandle nh,
                   Credentials cred,
                   int rtBase)
Constructor.

Parameters:
nh - a handle of the node trying to join the network.
cred - the credentials

JoinRequest

public JoinRequest(NodeHandle nh,
                   Credentials cred,
                   java.util.Date stamp,
                   int rtBase)
Constructor.

Parameters:
nh - a handle of the node trying to join the network.
cred - the credentials
stamp - the timestamp
Method Detail

getHandle

public NodeHandle getHandle()
Gets the handle of the node trying to join.

Returns:
the handle.

getJoinHandle

public NodeHandle getJoinHandle()
Gets the handle of the node that accepted the join request;

Returns:
the handle.

getLeafSet

public LeafSet getLeafSet()
Gets the leafset of the node that accepted the join request;

Returns:
the leafset.

accepted

public boolean accepted()
Returns true if the request was accepted, false if it hasn't yet.


acceptJoin

public void acceptJoin(NodeHandle nh,
                       LeafSet ls)
Accept join request.

Parameters:
nh - the node handle that accepts the join request.

lastRow

public int lastRow()
Returns the number of rows left to determine (in order).

Returns:
the number of rows left.

pushRow

public void pushRow(RouteSet[] row)
Push row.

Parameters:
row - the row to push.

getRow

public RouteSet[] getRow(int i)
Get row.

Parameters:
i - the row to get.
Returns:
the row.

numRows

public int numRows()
Get the number of rows.

Returns:
the number of rows.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

ePOST API

Copyright © 2001-2005 - Rice Pastry.