org.w3c.jigsaw.http.mux
Class MuxClientFactory

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

public class MuxClientFactory
extends java.lang.Object
implements org.w3c.jigsaw.http.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(org.w3c.jigsaw.http.httpd server)
          Initialize the MUX client factory.
 void shutdown(boolean force)
           
 
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)
Specified by:
shutdown in interface org.w3c.jigsaw.http.ClientFactory

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 org.w3c.jigsaw.http.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 org.w3c.jigsaw.http.ClientFactory
Returns:
A ServerSocket instance.
Throws:
java.io.IOException - If some IO error occured while creating the server socket.

initialize

public void initialize(org.w3c.jigsaw.http.httpd server)
Initialize the MUX client factory.
Specified by:
initialize in interface org.w3c.jigsaw.http.ClientFactory
Parameters:
server - The server context in which this factory is to run.