org.apache.geronimo.jetty6
Class JettyContainerImpl

java.lang.Object
  extended by org.apache.geronimo.jetty6.JettyContainerImpl
All Implemented Interfaces:
GBeanLifecycle, JettyContainer, NetworkContainer, WebContainer, J2EEManagedObject, StatisticsProvider, SoapHandler

public class JettyContainerImpl
extends Object
implements JettyContainer, SoapHandler, GBeanLifecycle, StatisticsProvider


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
JettyContainerImpl(String objectName, WebManager manager)
           
 
Method Summary
 void addContext(org.mortbay.jetty.handler.AbstractHandlerContainer context)
           
 void addListener(org.mortbay.jetty.Connector listener)
           
 InternalJAASJettyRealm addRealm(String realmName)
           
 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()
          Starts the GBean.
 void doStop()
          Stops the target.
 boolean getCollectStatistics()
           
 long getCollectStatisticsStarted()
           
 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.
 org.mortbay.jetty.RequestLog getRequestLog()
           
 Stats getStats()
          Gets the statistics collected for this class.
 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 removeContext(org.mortbay.jetty.handler.AbstractHandlerContainer context)
           
 void removeListener(org.mortbay.jetty.Connector listener)
           
 void removeRealm(String realmName)
           
 void removeWebService(String contextPath)
           
 void resetStatistics()
           
 void resetStats()
          Reset the startTime for all statistics
 void setCollectStatistics(boolean on)
           
 void setRequestLog(org.mortbay.jetty.RequestLog log)
           
 
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

JettyContainerImpl

public JettyContainerImpl(String objectName,
                          WebManager manager)
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

resetStatistics

public void resetStatistics()
Specified by:
resetStatistics in interface JettyContainer

setCollectStatistics

public void setCollectStatistics(boolean on)
Specified by:
setCollectStatistics in interface JettyContainer

getCollectStatistics

public boolean getCollectStatistics()
Specified by:
getCollectStatistics in interface JettyContainer

getCollectStatisticsStarted

public long getCollectStatisticsStarted()
Specified by:
getCollectStatisticsStarted in interface JettyContainer

resetStats

public void resetStats()
Description copied from interface: StatisticsProvider
Reset the startTime for all statistics

Specified by:
resetStats in interface StatisticsProvider

getStats

public Stats getStats()
Description copied from interface: StatisticsProvider
Gets the statistics collected for this class. The first call to this method initializes the startTime for all statistics.

Specified by:
getStats in interface StatisticsProvider
Returns:
gets collected for this class

addListener

public void addListener(org.mortbay.jetty.Connector listener)
Specified by:
addListener in interface JettyContainer

removeListener

public void removeListener(org.mortbay.jetty.Connector listener)
Specified by:
removeListener in interface JettyContainer

addContext

public void addContext(org.mortbay.jetty.handler.AbstractHandlerContainer context)
Specified by:
addContext in interface JettyContainer

removeContext

public void removeContext(org.mortbay.jetty.handler.AbstractHandlerContainer context)
Specified by:
removeContext in interface JettyContainer

addRealm

public InternalJAASJettyRealm addRealm(String realmName)
Specified by:
addRealm in interface JettyContainer

removeRealm

public void removeRealm(String realmName)
Specified by:
removeRealm in interface JettyContainer

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

setRequestLog

public void setRequestLog(org.mortbay.jetty.RequestLog log)
Specified by:
setRequestLog in interface JettyContainer

getRequestLog

public org.mortbay.jetty.RequestLog getRequestLog()
Specified by:
getRequestLog in interface JettyContainer

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

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()
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

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

getGBeanInfo

public static GBeanInfo getGBeanInfo()


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