org.apache.geronimo.jetty
Class JettyServletHolder

java.lang.Object
  extended by java.util.AbstractMap
      extended by org.mortbay.jetty.servlet.Holder
          extended by org.mortbay.jetty.servlet.ServletHolder
              extended by org.apache.geronimo.jetty.JettyServletHolder
All Implemented Interfaces:
Serializable, Comparable, Map, org.apache.geronimo.management.J2EEManagedObject, org.apache.geronimo.management.Servlet, org.mortbay.util.LifeCycle
Direct Known Subclasses:
JettyDefaultServletHolder

public class JettyServletHolder
extends org.mortbay.jetty.servlet.ServletHolder
implements org.apache.geronimo.management.Servlet

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), Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry
 
Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Fields inherited from class org.mortbay.jetty.servlet.Holder
_class, _className, _displayName, _httpHandler, _initParams, _name
 
Constructor Summary
JettyServletHolder()
           
JettyServletHolder(String objectName, String servletName, String servletClassName, String jspFile, Map initParams, Integer loadOnStartup, Set servletMappings, Subject runAsSubject, org.mortbay.jetty.servlet.ServletHolder previous, JettyServletRegistration context)
           
 
Method Summary
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 String getObjectName()
           
 String getServletName()
           
 void handle(ServletRequest request, ServletResponse response)
          Service a request with this servlet.
 boolean isEventProvider()
           
 boolean isStateManageable()
           
 boolean isStatisticsProvider()
           
 
Methods inherited from class org.mortbay.jetty.servlet.ServletHolder
compareTo, equals, getInitOrder, getRunAs, getServlet, getServletContext, getUserRoleLink, hashCode, setInitOrder, setRunAs, setUserRoleLink, start, stop
 
Methods inherited from class org.mortbay.jetty.servlet.Holder
entrySet, get, getClassName, getDisplayName, getHttpContext, getHttpHandler, getInitParameter, getInitParameterNames, getInitParameters, getName, isStarted, newInstance, put, setDisplayName, setInitParameter, toString
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

JettyServletHolder

public JettyServletHolder()

JettyServletHolder

public JettyServletHolder(String objectName,
                          String servletName,
                          String servletClassName,
                          String jspFile,
                          Map initParams,
                          Integer loadOnStartup,
                          Set servletMappings,
                          Subject runAsSubject,
                          org.mortbay.jetty.servlet.ServletHolder previous,
                          JettyServletRegistration context)
                   throws Exception
Throws:
Exception
Method Detail

getServletName

public String getServletName()

handle

public void handle(ServletRequest request,
                   ServletResponse response)
            throws ServletException,
                   UnavailableException,
                   IOException
Service a request with this servlet. Set the ThreadLocal to hold the current JettyServletHolder.

Overrides:
handle in class org.mortbay.jetty.servlet.ServletHolder
Throws:
ServletException
UnavailableException
IOException

getObjectName

public String getObjectName()
Specified by:
getObjectName in interface org.apache.geronimo.management.J2EEManagedObject

isStateManageable

public boolean isStateManageable()
Specified by:
isStateManageable in interface org.apache.geronimo.management.J2EEManagedObject

isStatisticsProvider

public boolean isStatisticsProvider()
Specified by:
isStatisticsProvider in interface org.apache.geronimo.management.J2EEManagedObject

isEventProvider

public boolean isEventProvider()
Specified by:
isEventProvider in interface org.apache.geronimo.management.J2EEManagedObject

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2006 Apache Software Foundation. All Rights Reserved.