rice.pastry.dist
Class NewDistPastryNodeFactory
java.lang.Object
|
+--rice.pastry.dist.DistPastryNodeFactory
|
+--rice.pastry.dist.NewDistPastryNodeFactory
- All Implemented Interfaces:
- rice.pastry.PastryNodeFactory
- public abstract class NewDistPastryNodeFactory
- extends rice.pastry.dist.DistPastryNodeFactory
A replacement of original DistPastryNodeFactory class.
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_TCP or PROTOCOL_UDP as the protocol, and the
port number the factory should use.
- Version:
- $Id: NewDistPastryNodeFactory.java,v 1.3 2003/10/01 00:58:40 glchen Exp $
- Author:
- Guanling Chen
Fields inherited from class rice.pastry.dist.DistPastryNodeFactory |
PROTOCOL_RMI, PROTOCOL_WIRE |
Method Summary |
static rice.pastry.dist.DistPastryNodeFactory |
getFactory(boolean serialize,
rice.pastry.NodeIdFactory nf,
int protocol,
int port)
Static method which is designed to be used by clients needing a
distrubuted pastry node factory. |
Methods inherited from class rice.pastry.dist.DistPastryNodeFactory |
, generateNodeHandle, getFactory, getNodeHandle, newNode, newNode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROTOCOL_TCP
public static int PROTOCOL_TCP
PROTOCOL_UDP
public static int PROTOCOL_UDP
NewDistPastryNodeFactory
protected NewDistPastryNodeFactory()
getFactory
public static rice.pastry.dist.DistPastryNodeFactory getFactory(boolean serialize,
rice.pastry.NodeIdFactory nf,
int protocol,
int port)
- Static method which is designed to be used by clients needing a
distrubuted pastry node factory. The protocol should be one of
PROTOCOL_TCP or PROTOCOL_UDP.
- Parameters:
protocol
- The protocol to use (PROTOCOL_TCP or PROTOCOL_UDP)port
- The starting port.
- Returns:
- A DistPastryNodeFactory using the given protocol and port.
- Throws:
java.lang.IllegalArgumentException
- If protocol is an unsupported port.