fabric.common.net
Class SubSocketFactory

java.lang.Object
  extended by fabric.common.net.SubSocketFactory

public final class SubSocketFactory
extends java.lang.Object

A factory for creating SubSockets. The factory decorates a javax.net.SocketFactory, which is used for creating the underlying channels.

Author:
mdgeorge

Constructor Summary
SubSocketFactory(HandshakeProtocol protocol, NameService nameService)
          Create a new SubSocket factory that decorates the given SocketFactory.
 
Method Summary
 SubSocket createSocket()
          Create an unconnected socket.
 SubSocket createSocket(java.lang.String name)
          Convenience method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubSocketFactory

public SubSocketFactory(HandshakeProtocol protocol,
                        NameService nameService)
Create a new SubSocket factory that decorates the given SocketFactory. Note that SubSockets created from different SubSocketFactories will not attempt to share channels (as these channels may have different underlying socket implementations).

Method Detail

createSocket

public SubSocket createSocket()
Create an unconnected socket.


createSocket

public SubSocket createSocket(java.lang.String name)
                       throws java.io.IOException
Convenience method. Resolves the name using the NameService and calls createSocket.

Throws:
java.io.IOException