org.apache.geronimo.tomcat
Class TomcatContainer

java.lang.Object
  extended by org.apache.geronimo.tomcat.TomcatContainer
All Implemented Interfaces:
GBeanLifecycle, NetworkContainer, WebContainer, J2EEManagedObject, TomcatWebContainer, SoapHandler

public class TomcatContainer
extends Object
implements SoapHandler, GBeanLifecycle, TomcatWebContainer

Apache Tomcat GBean http://wiki.apache.org/geronimo/Tomcat http://nagoya.apache.org/jira/browse/GERONIMO-215


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
TomcatContainer()
           
TomcatContainer(ClassLoader classLoader, String catalinaHome, String[] applicationListeners, ObjectRetriever engineGBean, LifecycleListenerGBean listenerChain, ServerInfo serverInfo, String objectName, WebManager manager)
          GBean constructor (invoked dynamically when the gbean is declared in a plan)
 
Method Summary
 void addConnector(org.apache.catalina.connector.Connector connector)
           
 void addContext(TomcatContext ctx)
          Creates and adds the context to the running host

It simply delegates the call to Tomcat's Embedded and Host classes

 void addWebService(String contextPath, String[] virtualHosts, WebServiceContainer webServiceContainer, String securityRealmName, String realmName, String transportGuarantee, String authMethod, ClassLoader classLoader)
           
 void doFail()
          Fails the GBean.
 void doStart()
          Instantiate and start up Tomcat's Embedded class

See org.apache.catalina.startup.Embedded for details (TODO: provide the link to the javadoc)

 void doStop()
          Stops the target.
 NetworkConnector[] getConnectors()
          Gets any existing connectors associated with this network container.
 NetworkConnector[] getConnectors(String protocol)
          Gets any existing connectors for this network container for the specified protocol.
static GBeanInfo getGBeanInfo()
           
 String getObjectName()
          Gets the unique name of this object.
 boolean isEventProvider()
          Determines if this object implemnts the event provider type defined in the J2EE Management specification.
 boolean isStateManageable()
          Determines if this object implements the state manageable type defined in the J2EE Management specification.
 boolean isStatisticsProvider()
          Determines if this object implemnts the statistics provider type defined in the J2EE Management specification.
 void removeConnector(org.apache.catalina.connector.Connector connector)
           
 void removeContext(TomcatContext ctx)
           
 void removeWebService(String contextPath)
           
 void setCatalinaHome(String catalinaHome)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

TomcatContainer

public TomcatContainer()

TomcatContainer

public TomcatContainer(ClassLoader classLoader,
                       String catalinaHome,
                       String[] applicationListeners,
                       ObjectRetriever engineGBean,
                       LifecycleListenerGBean listenerChain,
                       ServerInfo serverInfo,
                       String objectName,
                       WebManager manager)
GBean constructor (invoked dynamically when the gbean is declared in a plan)

Method Detail

getObjectName

public String getObjectName()
Description copied from interface: J2EEManagedObject
Gets the unique name of this object. The object name must comply with the ObjectName specification in the JMX specification and the restrictions in the J2EEManagementInterface.

Specified by:
getObjectName in interface J2EEManagedObject
Returns:
the unique name of this object within the server

isStateManageable

public boolean isStateManageable()
Description copied from interface: J2EEManagedObject
Determines if this object implements the state manageable type defined in the J2EE Management specification.

Specified by:
isStateManageable in interface J2EEManagedObject
Returns:
true if this class also implements the state manageable type; false otherwise

isStatisticsProvider

public boolean isStatisticsProvider()
Description copied from interface: J2EEManagedObject
Determines if this object implemnts the statistics provider type defined in the J2EE Management specification.

Specified by:
isStatisticsProvider in interface J2EEManagedObject
Returns:
true if this class also implements the statistics provider type; false otherwise

isEventProvider

public boolean isEventProvider()
Description copied from interface: J2EEManagedObject
Determines if this object implemnts the event provider type defined in the J2EE Management specification.

Specified by:
isEventProvider in interface J2EEManagedObject
Returns:
true if this class also implements the event manageable type; false otherwise

getConnectors

public NetworkConnector[] getConnectors()
Description copied from interface: NetworkContainer
Gets any existing connectors associated with this network container.

Specified by:
getConnectors in interface NetworkContainer

getConnectors

public NetworkConnector[] getConnectors(String protocol)
Description copied from interface: NetworkContainer
Gets any existing connectors for this network container for the specified protocol.

Specified by:
getConnectors in interface NetworkContainer
Parameters:
protocol - A protocol as returned by getSupportedProtocols

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

doStart

public void doStart()
             throws Exception
Instantiate and start up Tomcat's Embedded class

See org.apache.catalina.startup.Embedded for details (TODO: provide the link to the javadoc)

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

addContext

public void addContext(TomcatContext ctx)
                throws Exception
Creates and adds the context to the running host

It simply delegates the call to Tomcat's Embedded and Host classes

Parameters:
ctx - the context to be added
Throws:
Exception
See Also:
Embedded, Host

removeContext

public void removeContext(TomcatContext ctx)

setCatalinaHome

public void setCatalinaHome(String catalinaHome)

addConnector

public void addConnector(org.apache.catalina.connector.Connector connector)

removeConnector

public void removeConnector(org.apache.catalina.connector.Connector connector)

addWebService

public void addWebService(String contextPath,
                          String[] virtualHosts,
                          WebServiceContainer webServiceContainer,
                          String securityRealmName,
                          String realmName,
                          String transportGuarantee,
                          String authMethod,
                          ClassLoader classLoader)
                   throws Exception
Specified by:
addWebService in interface SoapHandler
Throws:
Exception

removeWebService

public void removeWebService(String contextPath)
Specified by:
removeWebService in interface SoapHandler

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.