Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.pastry.socket.appsocket
Class AppSocketPastryNodeFactory

    java.lang.Object
      rice.pastry.PastryNodeFactory
          rice.pastry.transport.TransportPastryNodeFactory
              rice.pastry.socket.SocketPastryNodeFactory
                  rice.pastry.socket.appsocket.AppSocketPastryNodeFactory

    public class AppSocketPastryNodeFactory

extends SocketPastryNodeFactory

Extends SocketPastryNodeFactory and adds getSocketFactory() to allow access to a FreePastry application w/o joining the Ring.

Author:
  Jeff Hoye

Nested Class Summary

Nested classes/interfaces inherited from class rice.pastry.socket.SocketPastryNodeFactory
`SocketPastryNodeFactory.TLBootstrapper, SocketPastryNodeFactory.TransLiveness<Identifier,MessageType>, SocketPastryNodeFactory.TransLivenessProximity<Identifier,MessageType>`

Field Summary
`static java.lang.String` | `SOCKET_FACTORY_UID`
`protected java.util.Map<java.lang.Integer,SocketManager>` | `socketTable` Used for getSocketChannel.
`static java.lang.String` | `STORE_SOCKET`

Fields inherited from class rice.pastry.socket.SocketPastryNodeFactory
`findFireWallPolicy, IP_SERVICE, localAddress, MULTI_ADDRESS_STRATEGY, MULTI_INET_TL, NETWORK_INFO_NODE_HANDLE_INDEX, nidFactory, NODE_HANDLE_FACTORY, PASTRY_MAGIC_NUMBER, PRIORITY_TL, PROXY_ADDRESS, 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
`AppSocketPastryNodeFactory(NodeIdFactory nf, java.net.InetAddress bindAddress, int startPort, Environment env)`
`AppSocketPastryNodeFactory(NodeIdFactory nf, int startPort, Environment env)`

Method Summary
`protected SocketPastryNodeFactory.TransLiveness<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer>` | `getLivenessTransportLayer(TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> tl, PastryNode pn)` If it's for a remote node, eliminate the liveness layer, and just return bogus results
`SocketFactory` | `getSocketFactory()`
`protected TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer>` | `getWireTransportLayer(java.net.InetSocketAddress innermostAddress, PastryNode pn)` This code tells the WireTransportLayerImpl not to create a server-socket if we are using the BogusTLPastryNode

Methods inherited from class rice.pastry.socket.SocketPastryNodeFactory
`cloneEnvironment, cloneLogManager, cloneProcessor, cloneRandomSource, cloneSelectorManager, getBindAddress, getBindStrategy, getBootstrapper, getBottomLayers, getCommonAPITransportLayer, getIdentityImpl, getIdentiySerializer, getIpServiceTransportLayer, getLimitSocketsTransportLayer, getLocalHandle, getLowerIdentityLayer, getMagicNumberTransportLayer, getMultiAddressSourceRouteFactory, getMultiAddressSourceRouteTransportLayer, getNextHopStrategy, getNextInetSocketAddress, getNodeHandle, getNodeHandle, getNodeHandle, getNodeHandle, getNodeHandleAdapter, getNodeHandleFactory, getOptionsAdder, getPriorityTransportLayer, getProbeStrategy, getSocketCountListener, getSourceRouteForwardStrategy, getSourceRouteManagerLayer, getSourceRouteStrategy, getSourceRouteTransportLayer, getUpperIdentityLayer, newNode, newNode, newNode, newNode, newNode, newNode, newNode, newNode, newNode, newNodeSelector, registerApps, verifyConnection`

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

### socketTable

    protected java.util.Map<java.lang.Integer,SocketManager> socketTable

  Used for getSocketChannel. The AppSocketFactroyLayer stores the channel here, and then it is retrieved when the channel is opened.

### STORE_SOCKET

    public static final java.lang.String STORE_SOCKET

See Also:
  Constant Field Values

### SOCKET_FACTORY_UID

    public static final java.lang.String SOCKET_FACTORY_UID

See Also:
  Constant Field Values

Constructor Detail

### AppSocketPastryNodeFactory

    public AppSocketPastryNodeFactory(NodeIdFactory nf,
                                      int startPort,
                                      Environment env)
                               throws java.io.IOException

Throws:
  `java.io.IOException`

### AppSocketPastryNodeFactory

    public AppSocketPastryNodeFactory(NodeIdFactory nf,
                                      java.net.InetAddress bindAddress,
                                      int startPort,
                                      Environment env)
                               throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### getSocketFactory

    public SocketFactory getSocketFactory()
                                   throws java.io.IOException

  Returns:
    used to open sockets to the remote node
  Throws:
    `java.io.IOException`

### getWireTransportLayer

    protected TransportLayer<java.net.InetSocketAddress,java.nio.ByteBuffer> getWireTransportLayer(java.net.InetSocketAddress innermostAddress,
                                                                                                   PastryNode pn)
                                                                                            throws java.io.IOException

  This code tells the WireTransportLayerImpl not to create a server-socket if we are using the BogusTLPastryNode

  Overrides:
    `getWireTransportLayer` in class `SocketPastryNodeFactory`
  Throws:
    `java.io.IOException`

### getLivenessTransportLayer

    protected SocketPastryNodeFactory.TransLiveness<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> getLivenessTransportLayer(TransportLayer<SourceRoute<MultiInetSocketAddress>,java.nio.ByteBuffer> tl,
                                                                                                                                       PastryNode pn)

  If it's for a remote node, eliminate the liveness layer, and just return bogus results

  Overrides:
    `getLivenessTransportLayer` in class `SocketPastryNodeFactory`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.