org.jboss.remoting.transport.http
Class HTTPServerInvoker

java.lang.Object
  extended byorg.jboss.remoting.AbstractInvoker
      extended byorg.jboss.remoting.ServerInvoker
          extended byorg.jboss.remoting.transport.web.WebServerInvoker
              extended byorg.jboss.remoting.transport.http.HTTPServerInvoker
All Implemented Interfaces:
Invoker, java.lang.Runnable, ServerInvokerMBean
Direct Known Subclasses:
HTTPSServerInvoker

public class HTTPServerInvoker
extends WebServerInvoker
implements java.lang.Runnable

Server invoker implementation based on http protocol. Is basically a stand alone http server whose request are forwared to the invocation handler and responses from invocation handler are sent back to caller as http response.


Field Summary
protected  int backlog
           
static java.lang.String HTML
           
static java.lang.String HTTP_KEEP_ALIVE_TIMEOUT_KEY
           
static java.lang.String HTTP_THREAD_POOL_CLASS_KEY
           
protected  int keepAliveTimeout
           
static java.lang.String MAX_NUM_HTTP_THREADS_KEY
           
static java.lang.String PLAIN
           
static java.lang.String SOAP
           
 
Fields inherited from class org.jboss.remoting.transport.web.WebServerInvoker
HEADER_SESSION_ID, HEADER_SUBSYSTEM
 
Fields inherited from class org.jboss.remoting.ServerInvoker
callbackHandlers, CLIENT_CONNECT_ADDRESS_KEY, CLIENT_CONNECT_PORT_KEY, CLIENT_LEASE_PERIOD, clientCallbackListener, DEFAULT_CLIENT_LEASE_PERIOD, handlers, MAX_NUM_ONEWAY_THREADS, MAX_NUM_ONEWAY_THREADS_KEY, ONEWAY_THREAD_POOL_CLASS_KEY, SERVER_BIND_ADDRESS_KEY, SERVER_BIND_PORT_KEY, SERVER_SOCKET_FACTORY, TIMEOUT
 
Fields inherited from class org.jboss.remoting.AbstractInvoker
classbyteloader, configuration, localServerLocators, locator, log, serializationType
 
Constructor Summary
HTTPServerInvoker(InvokerLocator locator)
           
HTTPServerInvoker(InvokerLocator locator, java.util.Map configuration)
           
 
Method Summary
protected  java.net.ServerSocket createServerSocket(int serverBindPort, int backlog, java.net.InetAddress bindAddress)
           
 org.jboss.util.threadpool.ThreadPool getHTTPThreadPool()
           
 int getKeepAliveTimeout()
           
 int getMaxNumberOfHTTPThreads()
           
 void run()
           
 void setHTTPThreadPool(org.jboss.util.threadpool.ThreadPool pool)
           
 void setKeepAliveTimeout(int keepAliveTimeout)
           
 void setMaxNumberOfHTTPThreads(int numOfThreads)
           
protected  void setup()
           
 void start()
          subclasses should override to provide any specific start logic
 void stop()
          subclasses should override to provide any specific stop logic
 
Methods inherited from class org.jboss.remoting.transport.web.WebServerInvoker
createNewInvocationRequest, getContentLength, getDefaultDataType, getInvocationRequest, getMarshaller, getSessionId, getUnMarshaller, isTransportBiDirectional
 
Methods inherited from class org.jboss.remoting.ServerInvoker
addConnectionListener, addInvocationHandler, create, createServerSocketFactory, destroy, getClientConnectAddress, getClientConnectPort, getConfiguration, getDataType, getDefaultServerSocketFactory, getInvocationHandler, getInvocationHandlers, getLeasePeriod, getMaxNumberOfOnewayThreads, getMBeanObjectName, getMBeanServer, getOnewayThreadPool, getServerBindAddress, getServerBindPort, getServerSocketFactory, getSupportedSubsystems, getTimeout, hasInvocationHandler, invoke, invoke, isStarted, postProcess, preProcess, removeCallbackListener, removeConnectionListener, removeInvocationHandler, setClientConnectAddress, setClientConnectPort, setConfiguration, setLeasePeriod, setMaxNumberOfOnewayThreads, setMBeanServer, setOnewayThreadPool, setServerSocketFactory, setTimeout
 
Methods inherited from class org.jboss.remoting.AbstractInvoker
addClientLocator, getClassLoader, getClientLocator, getLocator, getSerializationType, setClassLoader, setSerializationType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_NUM_HTTP_THREADS_KEY

public static final java.lang.String MAX_NUM_HTTP_THREADS_KEY
See Also:
Constant Field Values

HTTP_THREAD_POOL_CLASS_KEY

public static final java.lang.String HTTP_THREAD_POOL_CLASS_KEY
See Also:
Constant Field Values

HTTP_KEEP_ALIVE_TIMEOUT_KEY

public static final java.lang.String HTTP_KEEP_ALIVE_TIMEOUT_KEY
See Also:
Constant Field Values

backlog

protected int backlog

keepAliveTimeout

protected int keepAliveTimeout

HTML

public static java.lang.String HTML

PLAIN

public static java.lang.String PLAIN

SOAP

public static java.lang.String SOAP
Constructor Detail

HTTPServerInvoker

public HTTPServerInvoker(InvokerLocator locator)

HTTPServerInvoker

public HTTPServerInvoker(InvokerLocator locator,
                         java.util.Map configuration)
Method Detail

getKeepAliveTimeout

public int getKeepAliveTimeout()

setKeepAliveTimeout

public void setKeepAliveTimeout(int keepAliveTimeout)

setup

protected void setup()
              throws java.lang.Exception
Overrides:
setup in class ServerInvoker
Throws:
java.lang.Exception

setMaxNumberOfHTTPThreads

public void setMaxNumberOfHTTPThreads(int numOfThreads)

getMaxNumberOfHTTPThreads

public int getMaxNumberOfHTTPThreads()

getHTTPThreadPool

public org.jboss.util.threadpool.ThreadPool getHTTPThreadPool()

setHTTPThreadPool

public void setHTTPThreadPool(org.jboss.util.threadpool.ThreadPool pool)

start

public void start()
           throws java.io.IOException
Description copied from class: ServerInvoker
subclasses should override to provide any specific start logic

Specified by:
start in interface ServerInvokerMBean
Overrides:
start in class ServerInvoker
Throws:
java.io.IOException

createServerSocket

protected java.net.ServerSocket createServerSocket(int serverBindPort,
                                                   int backlog,
                                                   java.net.InetAddress bindAddress)
                                            throws java.io.IOException
Throws:
java.io.IOException

run

public void run()
Specified by:
run in interface java.lang.Runnable

stop

public void stop()
Description copied from class: ServerInvoker
subclasses should override to provide any specific stop logic

Specified by:
stop in interface ServerInvokerMBean
Overrides:
stop in class ServerInvoker


Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.