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
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)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
HTTP_PORT
public static final int HTTP_PORT
MuxClientFactory
public MuxClientFactory()
shutdown
public void shutdown(boolean force)
- Specified by:
- shutdown in interface 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 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.