org.apache.geronimo.jetty6
Class JettyServletHolder

java.lang.Object
  extended by org.apache.geronimo.jetty6.JettyServletHolder
All Implemented Interfaces:
GBeanLifecycle, ServletNameSource, J2EEManagedObject, Servlet
Direct Known Subclasses:
JettyDefaultServletHolder, JettyJspServletHolder

public class JettyServletHolder
extends Object
implements ServletNameSource, Servlet, GBeanLifecycle

This ServletHolder's sole purpose is to provide the thread's current ServletHolder for realms that are interested in the current servlet, e.g. current servlet name.

It is also being our servlet gbean for now. We could gbean-ize the superclass to avoid the thread local access.

See Also:
JAASJettyRealm.isUserInRole(java.security.Principal, String)

Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
JettyServletHolder()
           
JettyServletHolder(String objectName, String servletName, String servletClassName, String jspFile, Map initParams, Integer loadOnStartup, Set<String> servletMappings, String runAsRole, JettyServletRegistration context)
           
 
Method Summary
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
static GBeanInfo getGBeanInfo()
           
 String getObjectName()
          Gets the unique name of this object.
 String getServletClassName()
           
 String getServletName()
           
 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.
 
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

JettyServletHolder

public JettyServletHolder()

JettyServletHolder

public JettyServletHolder(String objectName,
                          String servletName,
                          String servletClassName,
                          String jspFile,
                          Map initParams,
                          Integer loadOnStartup,
                          Set<String> servletMappings,
                          String runAsRole,
                          JettyServletRegistration context)
                   throws Exception
Throws:
Exception
Method Detail

getServletName

public String getServletName()
Specified by:
getServletName in interface ServletNameSource

getServletClassName

public String getServletClassName()

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

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

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-2008 The Apache Geronimo development community. All Rights Reserved.