org.jboss.soa.esb.listeners.gateway
Class HttpGatewayListener

java.lang.Object
  extended by org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle
      extended by org.jboss.soa.esb.listeners.gateway.HttpGatewayListener
All Implemented Interfaces:
ManagedLifecycle

Deprecated.

public class HttpGatewayListener
extends AbstractManagedLifecycle

Tomcat Listener provides the functionality to pass the http request to ESB service .

This class will generate Connector, StandardHost and StandardContext for user defined http port, host and context. These generated tomcat components will be attached to jboss embedded tomcat(aka jboss web). You can monitor and control these new generated components through jboss JMX console. When this listener is stopped, these components will be destroyed automatically.

The different tomcat listener can be started in same port with different context.for example: http://localhost:8765/jbossesb/servicecategory/servicename

This class uses the HttpMessageComposer by default.

Author:
Jim Ma
See Also:
HttpMessageComposer, HttpDispatchServlet

Field Summary
 java.lang.String address
          Deprecated. Http address value
static java.lang.String ALLOW_HTTP_METHOD
          Deprecated. Allow http method config attribute name
static java.lang.String AUTH_METHOD
          Deprecated. Auth method config attribute name
static java.lang.String DISPATCH_SERVLET_CLASS
          Deprecated. The tag used to read the dispatch servlet class name value from configuration
 java.lang.String host
          Deprecated. Http host value
 java.lang.String httpContext
          Deprecated. listener contenxt
 java.lang.String maxThreads
          Deprecated. Default max threads
 java.lang.String port
          Deprecated. Http port value
static java.lang.String REQUEST_CONTEXT_TAG
          Deprecated. The tag used to read the context value from configuration
static java.lang.String SECURITY_DOMAIN
          Deprecated. Security domain config attribute name
static java.lang.String SECURITY_ROLE
          Deprecated. Security role config attribute name
static java.lang.String SERVER_HOST_TAG
          Deprecated. The tag used to read the host value from configuration
static java.lang.String SERVER_PORT_TAG
          Deprecated. The tag used to read the port value from configuration
 
Fields inherited from class org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle
PARAM_TERMINATION_PERIOD
 
Constructor Summary
HttpGatewayListener(ConfigTree config)
          Deprecated. Constuct the TomcatGatewyListner
 
Method Summary
protected  UncomposedMessageDeliveryAdapter createDeliveryAdapter()
          Deprecated. Get the uncomposed message delivery dapater
protected  void doDestroy()
          Deprecated. Handle the destroy of the managed instance.
protected  void doInitialise()
          Deprecated. Handle the initialisation of the managed instance.
protected  void doStart()
          Deprecated. Handle the start of the managed instance.
protected  void doStop()
          Deprecated. Handle the stop of the managed instance.
protected  void initWebappDefaults(org.apache.catalina.core.StandardContext ctx)
          Deprecated. Initialize the StandardContext.By default it will uses HttpDispatchServlet as default servlet mapping
protected  void startHttpServer()
          Deprecated. Start the tomcat http server.It will check if it really needs to create Tomcat connector and host.
 void stopHttpServer()
          Deprecated. Stop tomcat server.
 
Methods inherited from class org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle
addManagedLifecycleEventListener, changeState, destroy, getConfig, getState, getTerminationPeriod, initialise, removeManagedLifecycleEventListener, start, stop, waitUntilDestroyed, waitUntilDestroyed, waitUntilNotState, waitUntilState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_HOST_TAG

public static final java.lang.String SERVER_HOST_TAG
Deprecated. 
The tag used to read the host value from configuration

See Also:
Constant Field Values

SERVER_PORT_TAG

public static final java.lang.String SERVER_PORT_TAG
Deprecated. 
The tag used to read the port value from configuration

See Also:
Constant Field Values

REQUEST_CONTEXT_TAG

public static final java.lang.String REQUEST_CONTEXT_TAG
Deprecated. 
The tag used to read the context value from configuration

See Also:
Constant Field Values

DISPATCH_SERVLET_CLASS

public static final java.lang.String DISPATCH_SERVLET_CLASS
Deprecated. 
The tag used to read the dispatch servlet class name value from configuration

See Also:
Constant Field Values

ALLOW_HTTP_METHOD

public static final java.lang.String ALLOW_HTTP_METHOD
Deprecated. 
Allow http method config attribute name

See Also:
Constant Field Values

AUTH_METHOD

public static final java.lang.String AUTH_METHOD
Deprecated. 
Auth method config attribute name

See Also:
Constant Field Values

SECURITY_DOMAIN

public static final java.lang.String SECURITY_DOMAIN
Deprecated. 
Security domain config attribute name

See Also:
Constant Field Values

SECURITY_ROLE

public static final java.lang.String SECURITY_ROLE
Deprecated. 
Security role config attribute name

See Also:
Constant Field Values

host

public java.lang.String host
Deprecated. 
Http host value


address

public java.lang.String address
Deprecated. 
Http address value


port

public java.lang.String port
Deprecated. 
Http port value


maxThreads

public java.lang.String maxThreads
Deprecated. 
Default max threads


httpContext

public java.lang.String httpContext
Deprecated. 
listener contenxt

Constructor Detail

HttpGatewayListener

public HttpGatewayListener(ConfigTree config)
                    throws ConfigurationException
Deprecated. 
Constuct the TomcatGatewyListner

Parameters:
config - The listener configuration
Throws:
ConfigurationException - Exception during construction
Method Detail

doStart

protected void doStart()
                throws ManagedLifecycleException
Deprecated. 
Description copied from class: AbstractManagedLifecycle
Handle the start of the managed instance.

Specified by:
doStart in class AbstractManagedLifecycle
Throws:
ManagedLifecycleException - for errors while starting.

doStop

protected void doStop()
               throws ManagedLifecycleException
Deprecated. 
Description copied from class: AbstractManagedLifecycle
Handle the stop of the managed instance.

Specified by:
doStop in class AbstractManagedLifecycle
Throws:
ManagedLifecycleException - for errors while stopping.

doInitialise

protected void doInitialise()
                     throws ManagedLifecycleException
Deprecated. 
Description copied from class: AbstractManagedLifecycle
Handle the initialisation of the managed instance.

Specified by:
doInitialise in class AbstractManagedLifecycle
Throws:
ManagedLifecycleException - for errors while initialisation.

doDestroy

protected void doDestroy()
                  throws ManagedLifecycleException
Deprecated. 
Description copied from class: AbstractManagedLifecycle
Handle the destroy of the managed instance.

Specified by:
doDestroy in class AbstractManagedLifecycle
Throws:
ManagedLifecycleException - for errors while destroying.

startHttpServer

protected void startHttpServer()
                        throws java.lang.Exception
Deprecated. 
Start the tomcat http server.It will check if it really needs to create Tomcat connector and host. Then add these new tomcat component to tomcat Engine tree through JMX server.

Throws:
java.lang.Exception - For error during start tomcat context

stopHttpServer

public void stopHttpServer()
                    throws java.lang.Exception
Deprecated. 
Stop tomcat server. It will destroy the generated tomcat connector or host . Before do it , it will check if the reference count for it is zero .When there is no tomcat listener uses the generated host or connector, it will destroy it

Throws:
java.lang.Exception - For errors during stop tomcat connector or host

createDeliveryAdapter

protected UncomposedMessageDeliveryAdapter createDeliveryAdapter()
                                                          throws ConfigurationException
Deprecated. 
Get the uncomposed message delivery dapater

Returns:
uncomposed message delivery adapter
Throws:
ConfigurationException - For configuation error

initWebappDefaults

protected void initWebappDefaults(org.apache.catalina.core.StandardContext ctx)
                           throws java.lang.Exception
Deprecated. 
Initialize the StandardContext.By default it will uses HttpDispatchServlet as default servlet mapping

Parameters:
ctx - Created tomcat standard context
Throws:
java.lang.Exception - For errors during initialization