Rice Pastry API

rice.pastry.dist
Class DistPastryNodeFactory

java.lang.Object
  extended by rice.pastry.dist.DistPastryNodeFactory

public class DistPastryNodeFactory
extends java.lang.Object

An abstraction of the nodeId factory for distributed nodes. In order to obtain a nodeId factory, a client should use the getFactory method, passing in either PROTOCOL_RMI or PROTOCOL_WIRE as the protocol, and the port number the factory should use. In the wire protocol, the port number is the starting port number that the nodes are constructed on, and in the rmi protocol, the port number is the location of the local RMI registry.

Version:
$Id: DistPastryNodeFactory.java,v 1.8 2003/12/22 03:24:46 amislove Exp $
Author:
Alan Mislove

Field Summary
static int PROTOCOL_DEFAULT
           
static int PROTOCOL_RENDEZVOUS
           
static int PROTOCOL_SOCKET
           
 
Constructor Summary
DistPastryNodeFactory()
           
 
Method Summary
static SocketPastryNodeFactory getFactory(NodeIdFactory nf, int protocol, int port, Environment env)
          Static method which is designed to be used by clients needing a distrubuted pastry node factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL_SOCKET

public static int PROTOCOL_SOCKET

PROTOCOL_RENDEZVOUS

public static int PROTOCOL_RENDEZVOUS

PROTOCOL_DEFAULT

public static int PROTOCOL_DEFAULT
Constructor Detail

DistPastryNodeFactory

public DistPastryNodeFactory()
Method Detail

getFactory

public static SocketPastryNodeFactory getFactory(NodeIdFactory nf,
                                                 int protocol,
                                                 int port,
                                                 Environment env)
                                          throws java.io.IOException
Static method which is designed to be used by clients needing a distrubuted pastry node factory. The protocol should be one of PROTOCOL_RMI or PROTOCOL_WIRE. The port is protocol-dependent, and is the port number of the RMI registry if using RMI, or is the starting port number the nodes should be created on if using wire.

Parameters:
protocol - The protocol to use (PROTOCOL_RMI or PROTOCOL_WIRE)
port - The RMI registry port if RMI, or the starting port if wire.
nf - DESCRIBE THE PARAMETER
Returns:
A DistPastryNodeFactory using the given protocol and port.
Throws:
java.lang.IllegalArgumentException - If protocol is an unsupported port.
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection