fabric.common.net
Class SubServerSocketFactory

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

public class SubServerSocketFactory
extends java.lang.Object

factory for creating SubServerSockets. This class decorates a javax.net.ServerSocketFactory, which is used for instantiating the underlying channels.

Author:
mdgeorge

Constructor Summary
SubServerSocketFactory(HandshakeProtocol handshake, NameService nameService)
          Creates a new SubServerSocketFactory decorating the given ServerSocketFactory.
 
Method Summary
 SubServerSocket createServerSocket()
          create an unbound server socket.
 SubServerSocket createServerSocket(java.lang.String host)
          convenience method
 SubServerSocket createServerSocket(java.lang.String name, int backlog)
          create a server socket to await connections to the given local host name and port number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubServerSocketFactory

public SubServerSocketFactory(HandshakeProtocol handshake,
                              NameService nameService)
Creates a new SubServerSocketFactory decorating the given ServerSocketFactory.

Parameters:
factory - the ServerSocketFactory that will be used to create the ServerSockets used to implement SubServerSockets returned by this
Method Detail

createServerSocket

public SubServerSocket createServerSocket()
create an unbound server socket.


createServerSocket

public SubServerSocket createServerSocket(java.lang.String host)
                                   throws java.io.IOException
convenience method

Throws:
java.io.IOException

createServerSocket

public SubServerSocket createServerSocket(java.lang.String name,
                                          int backlog)
                                   throws java.io.IOException
create a server socket to await connections to the given local host name and port number.

Parameters:
name - the local name
backlog - the number of waiting connections to allow on this socket
Throws:
java.io.IOException
See Also:
ServerSocketFactory.createServerSocket(int, int, InetAddress)