|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.pastry.PastryNodeFactory rice.pastry.transport.TransportPastryNodeFactory rice.pastry.socket.SocketPastryNodeFactory
public class SocketPastryNodeFactory
Pastry node factory for Socket-linked nodes.
Nested Class Summary | |
---|---|
class |
SocketPastryNodeFactory.TLBootstrapper
|
protected static interface |
SocketPastryNodeFactory.TransLiveness<Identifier,MessageType>
|
protected static interface |
SocketPastryNodeFactory.TransLivenessProximity<Identifier,MessageType>
|
Field Summary | |
---|---|
protected int |
findFireWallPolicy
|
static java.lang.String |
IP_SERVICE
Maps to a InetSocketAddressLookup |
protected java.net.InetAddress |
localAddress
|
static java.lang.String |
MULTI_ADDRESS_STRATEGY
|
static java.lang.String |
MULTI_INET_TL
Maps to MultiInetAddressTransportLayer |
static byte |
NETWORK_INFO_NODE_HANDLE_INDEX
|
protected NodeIdFactory |
nidFactory
|
static java.lang.String |
NODE_HANDLE_FACTORY
|
static byte[] |
PASTRY_MAGIC_NUMBER
|
static java.lang.String |
PRIORITY_TL
maps to a PriorityTransportLayer |
static java.lang.String |
PROXY_ADDRESS
Maps to a MultiInetSocketAddress |
protected int |
testFireWallPolicy
|
Fields inherited from class rice.pastry.transport.TransportPastryNodeFactory |
---|
leafSetMaintFreq, routeSetMaintFreq |
Fields inherited from class rice.pastry.PastryNodeFactory |
---|
environment, logger, lSetSize, rtBase, rtMax |
Constructor Summary | |
---|---|
SocketPastryNodeFactory(NodeIdFactory nf,
java.net.InetAddress bindAddress,
int startPort,
Environment env)
|
|
SocketPastryNodeFactory(NodeIdFactory nf,
int startPort,
Environment env)
|
Methods inherited from class rice.pastry.transport.TransportPastryNodeFactory |
---|
getJoinProtocol, getLeafSetProtocol, getProximityNeighborSelector, getRouterStrategy, getRouteSetProtocol, getTLDeserializer, nodeHandleHelper |
Methods inherited from class rice.pastry.PastryNodeFactory |
---|
getEnvironment |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROXY_ADDRESS
public static final java.lang.String IP_SERVICE
public static final java.lang.String MULTI_INET_TL
public static final java.lang.String PRIORITY_TL
public static final java.lang.String MULTI_ADDRESS_STRATEGY
public static final byte[] PASTRY_MAGIC_NUMBER
protected NodeIdFactory nidFactory
protected java.net.InetAddress localAddress
protected int testFireWallPolicy
protected int findFireWallPolicy
public static final java.lang.String NODE_HANDLE_FACTORY
public static final byte NETWORK_INFO_NODE_HANDLE_INDEX
Constructor Detail |
---|
public SocketPastryNodeFactory(NodeIdFactory nf, int startPort, Environment env) throws java.io.IOException
java.io.IOException
public SocketPastryNodeFactory(NodeIdFactory nf, java.net.InetAddress bindAddress, int startPort, Environment env) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public java.net.InetAddress getBindAddress()
public java.net.InetSocketAddress getNextInetSocketAddress()
protected void registerApps(PastryNode pn, LeafSet leafSet, RoutingTable routeTable, NodeHandleAdapter nha, NodeHandleFactory handleFactory)
registerApps
in class TransportPastryNodeFactory
protected ProbeStrategy getProbeStrategy(PastryNode pn)
public NodeHandle getLocalHandle(PastryNode pn, NodeHandleFactory nhf)
getLocalHandle
in class TransportPastryNodeFactory
public NodeHandleFactory getNodeHandleFactory(PastryNode pn)
getNodeHandleFactory
in class TransportPastryNodeFactory
public TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> getBottomLayers(PastryNode pn, MultiInetSocketAddress proxyAddress) throws java.io.IOException
java.io.IOException
public NodeHandleAdapter getNodeHandleAdapter(PastryNode pn, NodeHandleFactory handleFactory2, TLDeserializer deserializer) throws java.io.IOException
getNodeHandleAdapter
in class TransportPastryNodeFactory
java.io.IOException
protected MultiAddressSourceRouteFactory getMultiAddressSourceRouteFactory(PastryNode pn)
protected TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> getWireTransportLayer(java.net.InetSocketAddress innermostAddress, PastryNode pn) throws java.io.IOException
java.io.IOException
protected SocketCountListener<java.net.InetSocketAddress> getSocketCountListener(PastryNode pn)
protected TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> getMagicNumberTransportLayer(TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> wtl, PastryNode pn)
protected TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> getLimitSocketsTransportLayer(TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> mntl, PastryNode pn)
protected TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> getIpServiceTransportLayer(TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> wtl, PastryNode pn) throws java.io.IOException
java.io.IOException
protected TransportLayer<MultiInetSocketAddress,java.nio.ByteBuffer> getMultiAddressSourceRouteTransportLayer(TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> mntl, PastryNode pn, MultiInetSocketAddress localAddress)
protected TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> getSourceRouteTransportLayer(TransportLayer<MultiInetSocketAddress,java.nio.ByteBuffer> etl, PastryNode pn, MultiAddressSourceRouteFactory esrFactory)
protected SourceRouteForwardStrategy<MultiInetSocketAddress> getSourceRouteForwardStrategy(PastryNode pn, MultiAddressSourceRouteFactory esrFactory)
protected IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>> getIdentiySerializer(PastryNode pn, SocketNodeHandleFactory handleFactory)
protected IdentityImpl<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,java.nio.ByteBuffer,SourceRoute<MultiInetSocketAddress>> getIdentityImpl(PastryNode pn, SocketNodeHandleFactory handleFactory) throws java.io.IOException
java.io.IOException
protected BindStrategy<TransportLayerNodeHandle<MultiInetSocketAddress>,SourceRoute<MultiInetSocketAddress>> getBindStrategy()
protected TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> getLowerIdentityLayer(TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> srl, PastryNode pn, IdentityImpl<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,java.nio.ByteBuffer,SourceRoute<MultiInetSocketAddress>> identity)
protected SocketPastryNodeFactory.TransLiveness<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> getLivenessTransportLayer(TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> tl, PastryNode pn)
protected SocketPastryNodeFactory.TransLivenessProximity<MultiInetSocketAddress,java.nio.ByteBuffer> getSourceRouteManagerLayer(TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> ltl, LivenessProvider<SourceRoute<MultiInetSocketAddress>> livenessProvider, Pinger<SourceRoute<MultiInetSocketAddress>> pinger, PastryNode pn, MultiInetSocketAddress proxyAddress, MultiAddressSourceRouteFactory esrFactory) throws java.io.IOException
java.io.IOException
protected SourceRouteStrategy<MultiInetSocketAddress> getSourceRouteStrategy(TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> ltl, LivenessProvider<SourceRoute<MultiInetSocketAddress>> livenessProvider, Pinger<SourceRoute<MultiInetSocketAddress>> pinger, PastryNode pn, MultiInetSocketAddress proxyAddress, MultiAddressSourceRouteFactory esrFactory) throws java.io.IOException
java.io.IOException
protected NextHopStrategy<MultiInetSocketAddress> getNextHopStrategy(TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> ltl, LivenessProvider<SourceRoute<MultiInetSocketAddress>> livenessProvider, Pinger<SourceRoute<MultiInetSocketAddress>> pinger, PastryNode pn, MultiInetSocketAddress proxyAddress, MultiAddressSourceRouteFactory esrFactory) throws java.io.IOException
java.io.IOException
protected PriorityTransportLayer<MultiInetSocketAddress> getPriorityTransportLayer(TransportLayer<MultiInetSocketAddress,java.nio.ByteBuffer> trans, LivenessProvider<MultiInetSocketAddress> liveness, ProximityProvider<MultiInetSocketAddress> prox, PastryNode pn)
protected SocketPastryNodeFactory.TransLivenessProximity<TransportLayerNodeHandle<MultiInetSocketAddress>,java.nio.ByteBuffer> getUpperIdentityLayer(TransportLayer<MultiInetSocketAddress,java.nio.ByteBuffer> priorityTL, PastryNode pn, IdentityImpl<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,java.nio.ByteBuffer,SourceRoute<MultiInetSocketAddress>> identity, LivenessProvider<MultiInetSocketAddress> live, ProximityProvider<MultiInetSocketAddress> prox, OverrideLiveness<SourceRoute<MultiInetSocketAddress>> overrideLiveness)
protected TransportLayer<TransportLayerNodeHandle<MultiInetSocketAddress>,RawMessage> getCommonAPITransportLayer(TransportLayer<TransportLayerNodeHandle<MultiInetSocketAddress>,java.nio.ByteBuffer> upperIdentity, PastryNode pn, TLDeserializer deserializer)
protected OptionsAdder getOptionsAdder(PastryNode pn)
protected Bootstrapper getBootstrapper(PastryNode pn, NodeHandleAdapter tl, NodeHandleFactory handleFactory, ProximityNeighborSelector pns)
getBootstrapper
in class TransportPastryNodeFactory
public NodeHandle getNodeHandle(java.net.InetSocketAddress bootstrap, int i)
public NodeHandle getNodeHandle(java.net.InetSocketAddress bootstrap)
public void getNodeHandle(java.net.InetSocketAddress[] bootstraps, Continuation<NodeHandle,java.lang.Exception> c)
public NodeHandle getNodeHandle(java.net.InetSocketAddress[] bootstraps, int int1)
public PastryNode newNode(NodeHandle bootstrap)
newNode
in class PastryNodeFactory
bootstrap
- Node handle to bootstrap from.
public PastryNode newNode(NodeHandle bootstrap, java.net.InetSocketAddress proxy)
bootstrap
- Node handle to bootstrap from.
public PastryNode newNode(NodeHandle bootstrap, Id nodeId)
newNode
in class PastryNodeFactory
bootstrap
- Node handle to bootstrap from.nodeId
- if non-null, will use this nodeId for the node, rather than using the NodeIdFactory
public PastryNode newNode()
newNode
in class PastryNodeFactory
public PastryNode newNode(Id id)
newNode
in class PastryNodeFactory
public PastryNode newNode(java.net.InetSocketAddress proxyAddress)
public PastryNode newNode(NodeHandle nodeHandle, Id id, java.net.InetSocketAddress proxyAddress)
pilot
- Node handle to bootstrap from.nodeId
- if non-null, will use this nodeId for the node, rather than using the NodeIdFactory
public PastryNode newNode(Id nodeId, java.net.InetSocketAddress pAddress)
nodeId
- pAddress
-
public PastryNode newNode(Id nodeId, MultiInetSocketAddress pAddress) throws java.io.IOException
nodeId
- if non-null, will use this nodeId for the node, rather than using
the NodeIdFactorypAddress
- The address to claim that this node is at - used for proxies
behind NATs
java.io.IOException
protected void newNodeSelector(Id nodeId, MultiInetSocketAddress proxyAddress, Continuation<PastryNode,java.io.IOException> deliverResultToMe, java.util.Map<java.lang.String,java.lang.Object> initialVars)
nodeId
- pAddress
- protected Environment cloneEnvironment(Environment rootEnvironment, Id nodeId)
protected LogManager cloneLogManager(Environment rootEnvironment, Id nodeId)
protected SelectorManager cloneSelectorManager(Environment rootEnvironment, Id nodeId, LogManager lman)
protected Processor cloneProcessor(Environment rootEnvironment, Id nodeId, LogManager lman)
protected RandomSource cloneRandomSource(Environment rootEnvironment, Id nodeId, LogManager lman)
public static java.net.InetSocketAddress verifyConnection(int i, java.net.InetSocketAddress addr, java.net.InetSocketAddress[] addr2, Environment env, Logger l)
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |