Rice Pastry API

rice.pastry.socket
Class SocketPastryNodeFactory

java.lang.Object
  extended by rice.pastry.PastryNodeFactory
      extended by rice.pastry.transport.TransportPastryNodeFactory
          extended by rice.pastry.socket.SocketPastryNodeFactory

public class SocketPastryNodeFactory
extends TransportPastryNodeFactory

Pastry node factory for Socket-linked nodes.

Version:
$Id: SocketPastryNodeFactory.java,v 1.6 2004/03/08 19:53:57 amislove Exp $
Author:
Alan Mislove

Field Summary
 
Fields inherited from class rice.pastry.transport.TransportPastryNodeFactory
findFireWallPolicy, PASTRY_MAGIC_NUMBER, testFireWallPolicy
 
Fields inherited from class rice.pastry.PastryNodeFactory
environment, logger, lSetSize, pingCache, rtBase, rtMax
 
Constructor Summary
SocketPastryNodeFactory(NodeIdFactory nf, java.net.InetAddress bindAddress, int startPort, Environment env, NATHandler handler)
           
SocketPastryNodeFactory(NodeIdFactory nf, int startPort, Environment env)
           
 
Method Summary
 NodeHandle getNodeHandle(java.net.InetSocketAddress bootstrap)
           
 void getNodeHandle(java.net.InetSocketAddress[] bootstraps, Continuation c)
           
 NodeHandle getNodeHandle(java.net.InetSocketAddress[] bootstraps, int int1)
           
 NodeHandle getNodeHandle(java.net.InetSocketAddress bootstrap, int i)
           
 PastryNode newNode(NodeHandle nodeHandle, Id id, java.net.InetSocketAddress proxyAddress)
          Method which creates a Pastry node from the next port with the specified nodeId (or one generated from the NodeIdFactory if not specified)
static java.net.InetSocketAddress verifyConnection(int i, java.net.InetSocketAddress addr, java.net.InetSocketAddress[] addr2, Environment env, Logger l)
           
 
Methods inherited from class rice.pastry.transport.TransportPastryNodeFactory
getLeafSet, getLeafSet, getProximity, getRouteRow, getRouteRow, newNode, newNode, newNode, newNode, newNode, newNode
 
Methods inherited from class rice.pastry.PastryNodeFactory
getEnvironment, getNearest, newNode, proximity, sortedProximityCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketPastryNodeFactory

public SocketPastryNodeFactory(NodeIdFactory nf,
                               int startPort,
                               Environment env)
                        throws java.io.IOException
Throws:
java.io.IOException

SocketPastryNodeFactory

public SocketPastryNodeFactory(NodeIdFactory nf,
                               java.net.InetAddress bindAddress,
                               int startPort,
                               Environment env,
                               NATHandler handler)
                        throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getNodeHandle

public NodeHandle getNodeHandle(java.net.InetSocketAddress bootstrap,
                                int i)

getNodeHandle

public NodeHandle getNodeHandle(java.net.InetSocketAddress bootstrap)

getNodeHandle

public void getNodeHandle(java.net.InetSocketAddress[] bootstraps,
                          Continuation c)

getNodeHandle

public NodeHandle getNodeHandle(java.net.InetSocketAddress[] bootstraps,
                                int int1)

newNode

public PastryNode newNode(NodeHandle nodeHandle,
                          Id id,
                          java.net.InetSocketAddress proxyAddress)
Description copied from class: TransportPastryNodeFactory
Method which creates a Pastry node from the next port with the specified nodeId (or one generated from the NodeIdFactory if not specified)

Overrides:
newNode in class TransportPastryNodeFactory
Parameters:
nodeHandle - Node handle to bootstrap from.
id - if non-null, will use this nodeId for the node, rather than using the NodeIdFactory
Returns:
A node with a random ID and next port number.

verifyConnection

public static java.net.InetSocketAddress verifyConnection(int i,
                                                          java.net.InetSocketAddress addr,
                                                          java.net.InetSocketAddress[] addr2,
                                                          Environment env,
                                                          Logger l)

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection