org.mortbay.jetty.servlet
Class Holder
java.lang.Object
org.mortbay.component.AbstractLifeCycle
org.mortbay.jetty.servlet.Holder
- All Implemented Interfaces:
- Serializable, LifeCycle
- Direct Known Subclasses:
- FilterHolder, ServletHolder
public class Holder
- extends AbstractLifeCycle
- implements Serializable
- Author:
- Greg Wilkins
- See Also:
- Serialized Form
_class
protected transient Class _class
_className
protected String _className
_displayName
protected String _displayName
_initParams
protected Map _initParams
_extInstance
protected boolean _extInstance
_name
protected String _name
_servletHandler
protected ServletHandler _servletHandler
Holder
protected Holder()
Holder
protected Holder(Class held)
doStart
public void doStart()
throws Exception
- Overrides:
doStart
in class AbstractLifeCycle
- Throws:
Exception
doStop
public void doStop()
- Overrides:
doStop
in class AbstractLifeCycle
getClassName
public String getClassName()
getHeldClass
public Class getHeldClass()
getDisplayName
public String getDisplayName()
getInitParameter
public String getInitParameter(String param)
getInitParameterNames
public Enumeration getInitParameterNames()
getInitParameters
public Map getInitParameters()
getName
public String getName()
getServletHandler
public ServletHandler getServletHandler()
- Returns:
- Returns the servletHandler.
newInstance
public Object newInstance()
throws InstantiationException,
IllegalAccessException
- Throws:
InstantiationException
IllegalAccessException
destroyInstance
public void destroyInstance(Object instance)
throws Exception
- Throws:
Exception
setClassName
public void setClassName(String className)
- Parameters:
className
- The className to set.
setHeldClass
public void setHeldClass(Class held)
- Parameters:
className
- The className to set.
setDisplayName
public void setDisplayName(String name)
setInitParameter
public void setInitParameter(String param,
String value)
setInitParameters
public void setInitParameters(Map map)
setName
public void setName(String name)
- The name is a primary key for the held object.
Ensure that the name is set BEFORE adding a Holder
(eg ServletHolder or FilterHolder) to a ServletHandler.
- Parameters:
name
- The name to set.
setServletHandler
public void setServletHandler(ServletHandler servletHandler)
- Parameters:
servletHandler
- The ServletHandler
that will handle requests dispatched to this servlet.
toString
public String toString()
- Overrides:
toString
in class Object