Rice Pastry API

rice.pastry.join
Class JoinRequest

java.lang.Object
  extended byrice.pastry.messaging.Message
      extended byrice.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,v 1.11 2005/06/29 18:01:41 jstewart Exp $
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()
          DESCRIBE THE METHOD
 
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.
rtBase - DESCRIBE THE PARAMETER

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
rtBase - DESCRIBE THE PARAMETER

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
rtBase - DESCRIBE THE PARAMETER

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
rtBase - DESCRIBE THE PARAMETER
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.

getRow

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

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

accepted

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

Returns:
DESCRIBE THE RETURN VALUE

acceptJoin

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

Parameters:
nh - the node handle that accepts the join request.
ls - DESCRIBE THE PARAMETER

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.

numRows

public int numRows()
Get the number of rows.

Returns:
the number of rows.

toString

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

Returns:
DESCRIBE THE RETURN VALUE

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection