org.globus.wsrf.container
Class ServiceDispatcher
java.lang.Object
org.globus.wsrf.container.ServiceDispatcher
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- GSIServiceDispatcher
- public class ServiceDispatcher
- extends java.lang.Object
- implements java.lang.Runnable
Dispatcher reading requests off the socket and putting them into a
request queue.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
static org.apache.commons.logging.Log logger
i18n
static org.globus.util.I18n i18n
serverSocket
private java.net.ServerSocket serverSocket
worker
private volatile java.lang.Thread worker
stopped
private volatile boolean stopped
semaphore
private Semaphore semaphore
queue
protected ServiceRequestQueue queue
threadPool
protected ServiceThreadPool threadPool
numThreads
protected int numThreads
maxThreads
protected int maxThreads
highWaterMark
protected int highWaterMark
engine
protected org.apache.axis.server.AxisServer engine
msgContext
protected org.apache.axis.MessageContext msgContext
containerDescriptor
protected ContainerSecurityDescriptor containerDescriptor
homeDir
private java.lang.String homeDir
configDir
private java.lang.String configDir
configProfile
private java.lang.String configProfile
ServiceDispatcher
protected ServiceDispatcher()
ServiceDispatcher
public ServiceDispatcher(java.util.Map properties)
throws java.lang.Exception
init
protected void init()
throws java.lang.Exception
- Throws:
java.lang.Exception
createMessageContext
protected org.apache.axis.MessageContext createMessageContext()
setupThreadPool
protected void setupThreadPool()
throws java.lang.Exception
- Throws:
java.lang.Exception
getAxisEngine
public org.apache.axis.AxisEngine getAxisEngine()
setServerSocket
public void setServerSocket(java.net.ServerSocket serverSocket)
getServerSocket
public java.net.ServerSocket getServerSocket()
setThreads
public void setThreads(int numThreads)
getServiceThreadPool
public ServiceThreadPool getServiceThreadPool()
getServiceRequestQueue
public ServiceRequestQueue getServiceRequestQueue()
getOptionAsInt
private static int getOptionAsInt(ContainerConfig config,
java.lang.String property,
int defaultValue)
run
public void run()
- Specified by:
run in interface java.lang.Runnable
waitForInit
public void waitForInit()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
waitForStop
public void waitForStop()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
addThread
private int addThread()
removeThread
private void removeThread()
stop
public void stop()
throws java.io.IOException
- Throws:
java.io.IOException
isStopped
public boolean isStopped()
start
public void start(boolean daemon)
- Start this dispatcher.
Spawns a worker thread to listen for HTTP requests.
- Parameters:
daemon - a boolean indicating if the thread should be a daemon.