Package org.eclipse.jetty.servlet
Class Holder<T>
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.servlet.BaseHolder<T>
-
- org.eclipse.jetty.servlet.Holder<T>
-
- Type Parameters:
T
- the type of holder
- Direct Known Subclasses:
FilterHolder
,ServletHolder
@ManagedObject("Holder - a container for servlets and the like") public abstract class Holder<T> extends BaseHolder<T>
Holder Specialization of AbstractHolder for servlet-related classes that have init-params etc
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Holder.HolderConfig
protected class
Holder.HolderRegistration
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroyInstance(java.lang.Object instance)
java.lang.String
dump()
java.lang.String
getDisplayName()
java.lang.String
getInitParameter(java.lang.String param)
java.util.Enumeration<java.lang.String>
getInitParameterNames()
java.util.Map<java.lang.String,java.lang.String>
getInitParameters()
java.lang.String
getName()
boolean
isAsyncSupported()
void
setAsyncSupported(boolean suspendable)
void
setClassName(java.lang.String className)
void
setDisplayName(java.lang.String name)
void
setHeldClass(java.lang.Class<? extends T> held)
void
setInitParameter(java.lang.String param, java.lang.String value)
void
setInitParameters(java.util.Map<java.lang.String,java.lang.String> map)
protected void
setInstance(T instance)
void
setName(java.lang.String name)
The name is a primary key for the held object.java.lang.String
toString()
-
Methods inherited from class org.eclipse.jetty.servlet.BaseHolder
doStart, doStop, dump, getClassName, getHeldClass, getInstance, getServletHandler, getSource, illegalStateIfContextStarted, initialize, isInstance, setServletHandler, unwrap, wrap
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
-
-
-
-
Constructor Detail
-
Holder
protected Holder(Source source)
-
-
Method Detail
-
getDisplayName
@ManagedAttribute(value="Display Name", readonly=true) public java.lang.String getDisplayName()
-
getInitParameter
public java.lang.String getInitParameter(java.lang.String param)
-
getInitParameterNames
public java.util.Enumeration<java.lang.String> getInitParameterNames()
-
getInitParameters
@ManagedAttribute(value="Initial Parameters", readonly=true) public java.util.Map<java.lang.String,java.lang.String> getInitParameters()
-
getName
@ManagedAttribute(value="Name", readonly=true) public java.lang.String getName()
-
setInstance
protected void setInstance(T instance)
- Overrides:
setInstance
in classBaseHolder<T>
-
destroyInstance
public void destroyInstance(java.lang.Object instance) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setClassName
public void setClassName(java.lang.String className)
- Overrides:
setClassName
in classBaseHolder<T>
- Parameters:
className
- The className to set.
-
setHeldClass
public void setHeldClass(java.lang.Class<? extends T> held)
- Overrides:
setHeldClass
in classBaseHolder<T>
- Parameters:
held
- The class to hold
-
setDisplayName
public void setDisplayName(java.lang.String name)
-
setInitParameter
public void setInitParameter(java.lang.String param, java.lang.String value)
-
setInitParameters
public void setInitParameters(java.util.Map<java.lang.String,java.lang.String> map)
-
setName
public void setName(java.lang.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.
-
setAsyncSupported
public void setAsyncSupported(boolean suspendable)
-
isAsyncSupported
public boolean isAsyncSupported()
-
dump
public java.lang.String dump()
- Specified by:
dump
in interfaceDumpable
- Overrides:
dump
in classBaseHolder<T>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractLifeCycle
-
-