## org.w3c.jigsaw.http.mux
Class MuxClientFactory

    java.lang.Object
      |
      +--org.w3c.jigsaw.http.mux.MuxClientFactory

public class MuxClientFactory
extends java.lang.Object
implements ClientFactory

Field Summary
`static int` `HTTP_PORT`

Constructor Summary
`MuxClientFactory()`

Method Summary
`java.net.ServerSocket` `createServerSocket()` Create a suitable server socket for our server context.
`void` `handleConnection(java.net.Socket socket)` Handle that new incomming connection.
`void` `initialize(httpd server)` Initialize the MUX client factory.
`void` `shutdown(boolean force)` Shutdown this client factory.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HTTP_PORT

    public static final int HTTP_PORT

Constructor Detail

### MuxClientFactory

    public MuxClientFactory()

Method Detail

### shutdown

    public void shutdown(boolean force)

  Description copied from interface: ClientFactory
  Shutdown this client factory.
  Specified by:
    shutdown in interface ClientFactory
  Tags copied from interface: ClientFactory
  Parameters:
    `force` - If true, force the shutdown, and stop all operations in progress.

### handleConnection

    public void handleConnection(java.net.Socket socket)

  Handle that new incomming connection. Wrap the given socket into a MuxStream, the rest is handled magically.
  Specified by:
    handleConnection in interface ClientFactory
  Parameters:
    `socket` - The newly accepted socket.

### createServerSocket

    public java.net.ServerSocket createServerSocket()
                                             throws java.io.IOException

  Create a suitable server socket for our server context.
  Specified by:
    createServerSocket in interface ClientFactory
  Returns:
    A ServerSocket instance.
  Throws:
    java.io.IOException - If some IO error occured while creating the server socket.

### initialize

    public void initialize(httpd server)

  Initialize the MUX client factory.
  Specified by:
    initialize in interface ClientFactory
  Parameters:
    `server` - The server context in which this factory is to run.