org.sblim.cimclient.internal.http

Class HttpServerConnection.HttpConnectionDispatcher

private static class HttpServerConnection.HttpConnectionDispatcher extends Thread

Class HttpConnectionDispatcher is responsible for dispatching the incoming connections to the handlers. It doesn't execute the handler directly but creates a runnable that is submitted to a thread pool which takes care of execution.
Constructor Summary
HttpConnectionDispatcher(ThreadGroup pGroup, HttpConnectionHandler pHandler, ThreadPool pPool)
Ctor.
Method Summary
voidclose()
Closes the dispatcher
voiddispatch(Socket pSocket)
Dispatches a connection
SocketgetConnection()
Gets the next pending connection
ListgetConnectionPool()
Returns the connection pool
voidrun()

Constructor Detail

HttpConnectionDispatcher

public HttpConnectionDispatcher(ThreadGroup pGroup, HttpConnectionHandler pHandler, ThreadPool pPool)
Ctor.

Parameters: pGroup The thread group to use for this thread and it's children pHandler The connection handler pPool The thread pool

Method Detail

close

public void close()
Closes the dispatcher

dispatch

public void dispatch(Socket pSocket)
Dispatches a connection

Parameters: pSocket The socket of the connection

getConnection

public Socket getConnection()
Gets the next pending connection

Returns: The socket of the connection

getConnectionPool

public List getConnectionPool()
Returns the connection pool

Returns: The connection pool

run

public void run()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.