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_THREAD_POOL_CLASS_KEY
           
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
BINARY, HEADER_SESSION_ID, HEADER_SUBSYSTEM
 
Fields inherited from class org.jboss.remoting.ServerInvoker
callbackHandlers, CLIENT_CONNECT_ADDRESS_KEY, CLIENT_CONNECT_PORT_KEY, handlers, MAX_NUM_ONEWAY_THREADS, MAX_NUM_ONEWAY_THREADS_KEY, ONEWAY_THREAD_POOL_CLASS_KEY, SERVER_BIND_ADDRESS_KEY, SERVER_BIND_PORT_KEY
 
Fields inherited from class org.jboss.remoting.AbstractInvoker
classbyteloader, localServerLocators, locator, log
 
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)
           
protected  java.lang.String getDefaultDataType()
           
 org.jboss.util.threadpool.ThreadPool getHTTPThreadPool()
           
 int getMaxNumberOfHTTPThreads()
           
 void run()
           
 void setHTTPThreadPool(org.jboss.util.threadpool.ThreadPool pool)
           
 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, getInvocationRequest, getSessionId, isBinary, isTransportBiDirectional
 
Methods inherited from class org.jboss.remoting.ServerInvoker
addInvocationHandler, create, destroy, getClientConnectAddress, getClientConnectPort, getConfiguration, getDataType, getInvocationHandler, getInvocationHandlers, getMaxNumberOfOnewayThreads, getMBeanObjectName, getMBeanServer, getOnewayThreadPool, getServerBindAddress, getServerBindPort, getSupportedSubsystems, hasInvocationHandler, invoke, invoke, isStarted, postProcess, preProcess, removeInvocationHandler, setClientConnectAddress, setClientConnectPort, setConfiguration, setMaxNumberOfOnewayThreads, setMBeanServer, setOnewayThreadPool
 
Methods inherited from class org.jboss.remoting.AbstractInvoker
addClientLocator, getClassLoader, getClientLocator, getLocator, setClassLoader
 
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

backlog

protected int backlog

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

getDefaultDataType

protected java.lang.String getDefaultDataType()
Specified by:
getDefaultDataType in class ServerInvoker

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.