Top Description Inners Fields Constructors Methods
org.eclipse.jetty.ee10.servlet

public abstract Class Holder<T>

extends BaseHolder<T>
Class Inheritance
Known Direct Subclasses
org.eclipse.jetty.ee10.servlet.ServletHolder, org.eclipse.jetty.ee10.servlet.FilterHolder
Annotations
@ManagedObject:Holder - a container for servlets and the like
Type Parameters
<T>
the type of holder
Imports
java.util.Collections, .Enumeration, .HashMap, .HashSet, .Map, .Set, jakarta.servlet.Registration, .ServletContext, org.eclipse.jetty.util.annotation.ManagedAttribute, .ManagedObject, org.eclipse.jetty.util.thread.AutoLock, org.slf4j.Logger, .LoggerFactory

Holder Specialization of AbstractHolder for servlet-related classes that have init-params etc

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
protected class

Field Summary

Modifier and TypeField and Description
private boolean
private String
private final Map<String, String>
private String
private static final Logger

Constructor Summary

AccessConstructor and Description
protected
Holder(Source source)

Method Summary

Modifier and TypeMethod and Description
public void
public String
public String
public String
public Enumeration<String>
public Map<String, String>
public String
public boolean
public void
setAsyncSupported(boolean suspendable)

public void
public void
public void
setHeldClass(Class<? extends T>
The class to hold
held
)

Overrides org.eclipse.jetty.ee10.servlet.BaseHolder.setHeldClass.

public void
public void
protected void
public void
setName(String
The name to set.
name
)

The name is a primary key for the held object.

public String
toString()

Overrides org.eclipse.jetty.util.component.AbstractLifeCycle.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jetty.ee10.servlet.BaseHolder:
createInstancedoStartdoStopdumpgetClassNamegetHeldClassgetInstancegetServletContextgetServletContextHandlergetServletHandlergetSourceillegalStateIfContextStartedinitializeisInstancelocklockIsHeldByCurrentThreadsetServletHandlerunwrapwrap

Field Detail

_asyncSupportedback to summary
private boolean _asyncSupported
_displayNameback to summary
private String _displayName
_initParamsback to summary
private final Map<String, String> _initParams
_nameback to summary
private String _name
LOGback to summary
private static final Logger LOG

Hides org.eclipse.jetty.ee10.servlet.BaseHolder.LOG.

Constructor Detail

Holderback to summary
protected Holder(Source source)

Method Detail

destroyInstanceback to summary
public void destroyInstance(Object instance) throws Exception
dumpback to summary
public String dump()

Overrides org.eclipse.jetty.ee10.servlet.BaseHolder.dump.

Overrides default org.eclipse.jetty.util.component.Dumpable.dump.

Annotations
@Override
getDisplayNameback to summary
public String getDisplayName()
Annotations
@ManagedAttribute:Display Name
readonly:true
getInitParameterback to summary
public String getInitParameter(String param)
getInitParameterNamesback to summary
public Enumeration<String> getInitParameterNames()
getInitParametersback to summary
public Map<String, String> getInitParameters()
Annotations
@ManagedAttribute:Initial Parameters
readonly:true
getNameback to summary
public String getName()
Annotations
@ManagedAttribute:Name
readonly:true
isAsyncSupportedback to summary
public boolean isAsyncSupported()
setAsyncSupportedback to summary
public void setAsyncSupported(boolean suspendable)
setClassNameback to summary
public void setClassName(String className)

Overrides org.eclipse.jetty.ee10.servlet.BaseHolder.setClassName.

Parameters
className:String

The className to set.

Annotations
@Override
setDisplayNameback to summary
public void setDisplayName(String name)
setHeldClassback to summary
public void setHeldClass(Class<? extends T> held)

Overrides org.eclipse.jetty.ee10.servlet.BaseHolder.setHeldClass.

Parameters
held:Class<? extends T>

The class to hold

Annotations
@Override
setInitParameterback to summary
public void setInitParameter(String param, String value)
setInitParametersback to summary
public void setInitParameters(Map<String, String> map)
setInstanceback to summary
protected void setInstance(T instance)

Overrides org.eclipse.jetty.ee10.servlet.BaseHolder.setInstance.

Annotations
@Override
setNameback to summary
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:String

The name to set.

toStringback to summary
public String toString()

Overrides org.eclipse.jetty.util.component.AbstractLifeCycle.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jetty.ee10.servlet back to summary

protected Class Holder.HolderConfig

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.jetty.ee10.servlet.ServletHolder.Config, org.eclipse.jetty.ee10.servlet.FilterHolder.Config

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public String
public Enumeration<String>
public ServletContext
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HolderConfigback to summary
protected HolderConfig()

Method Detail

getInitParameterback to summary
public String getInitParameter(String param)
getInitParameterNamesback to summary
public Enumeration<String> getInitParameterNames()
getServletContextback to summary
public ServletContext getServletContext()
org.eclipse.jetty.ee10.servlet back to summary

protected Class Holder.HolderRegistration

extends Object
implements Dynamic
Class Inheritance
All Implemented Interfaces
jakarta.servlet.Registration.Dynamic, jakarta.servlet.Registration
Known Direct Subclasses
org.eclipse.jetty.ee10.servlet.ServletHolder.Registration, org.eclipse.jetty.ee10.servlet.FilterHolder.Registration

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public String
getClassName()

Implements jakarta.servlet.Registration.getClassName.

Gets the fully qualified class name of the Servlet or Filter that is represented by this Registration.

public String
getInitParameter(String
the name of the initialization parameter whose value is requested
name
)

Implements jakarta.servlet.Registration.getInitParameter.

Gets the value of the initialization parameter with the given name that will be used to initialize the Servlet or Filter represented by this Registration object.

public Map<String, String>
getInitParameters()

Implements jakarta.servlet.Registration.getInitParameters.

Gets an immutable (and possibly empty) Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object.

public String
getName()

Implements jakarta.servlet.Registration.getName.

Gets the name of the Servlet or Filter that is represented by this Registration.

public void
setAsyncSupported(boolean
true if the Servlet or Filter represented by this dynamic Registration supports asynchronous operations, false otherwise
isAsyncSupported
)

Implements jakarta.servlet.Registration.Dynamic.setAsyncSupported.

Configures the Servlet or Filter represented by this dynamic Registration as supporting asynchronous operations or not.

public void
setDescription(String description)

public boolean
setInitParameter(String
the initialization parameter name
name
,
String
the initialization parameter value
value
)

Implements jakarta.servlet.Registration.setInitParameter.

Sets the initialization parameter with the given name and value on the Servlet or Filter that is represented by this Registration.

public Set<String>
setInitParameters(Map<String, String>
the initialization parameters
initParameters
)

Implements jakarta.servlet.Registration.setInitParameters.

Sets the given initialization parameters on the Servlet or Filter that is represented by this Registration.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HolderRegistrationback to summary
protected HolderRegistration()

Method Detail

getClassNameback to summary
public String getClassName()

Implements jakarta.servlet.Registration.getClassName.

Doc from jakarta.servlet.Registration.getClassName.

Gets the fully qualified class name of the Servlet or Filter that is represented by this Registration.

Returns:String

the fully qualified class name of the Servlet or Filter that is represented by this Registration, or null if this Registration is preliminary

Annotations
@Override
getInitParameterback to summary
public String getInitParameter(String name)

Implements jakarta.servlet.Registration.getInitParameter.

Doc from jakarta.servlet.Registration.getInitParameter.

Gets the value of the initialization parameter with the given name that will be used to initialize the Servlet or Filter represented by this Registration object.

Parameters
name:String

the name of the initialization parameter whose value is requested

Returns:String

the value of the initialization parameter with the given name, or null if no initialization parameter with the given name exists

Annotations
@Override
getInitParametersback to summary
public Map<String, String> getInitParameters()

Implements jakarta.servlet.Registration.getInitParameters.

Doc from jakarta.servlet.Registration.getInitParameters.

Gets an immutable (and possibly empty) Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object.

Returns:Map<String, String>

Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object

Annotations
@Override
getNameback to summary
public String getName()

Implements jakarta.servlet.Registration.getName.

Doc from jakarta.servlet.Registration.getName.

Gets the name of the Servlet or Filter that is represented by this Registration.

Returns:String

the name of the Servlet or Filter that is represented by this Registration

Annotations
@Override
setAsyncSupportedback to summary
public void setAsyncSupported(boolean isAsyncSupported)

Implements jakarta.servlet.Registration.Dynamic.setAsyncSupported.

Doc from jakarta.servlet.Registration.Dynamic.setAsyncSupported.

Configures the Servlet or Filter represented by this dynamic Registration as supporting asynchronous operations or not.

By default, servlet and filters do not support asynchronous operations.

A call to this method overrides any previous setting.

Parameters
isAsyncSupported:boolean

true if the Servlet or Filter represented by this dynamic Registration supports asynchronous operations, false otherwise

Annotations
@Override
setDescriptionback to summary
public void setDescription(String description)
setInitParameterback to summary
public boolean setInitParameter(String name, String value)

Implements jakarta.servlet.Registration.setInitParameter.

Doc from jakarta.servlet.Registration.setInitParameter.

Sets the initialization parameter with the given name and value on the Servlet or Filter that is represented by this Registration.

Parameters
name:String

the initialization parameter name

value:String

the initialization parameter value

Returns:boolean

true if the update was successful, i.e., an initialization parameter with the given name did not already exist for the Servlet or Filter represented by this Registration, and false otherwise

Annotations
@Override
setInitParametersback to summary
public Set<String> setInitParameters(Map<String, String> initParameters)

Implements jakarta.servlet.Registration.setInitParameters.

Doc from jakarta.servlet.Registration.setInitParameters.

Sets the given initialization parameters on the Servlet or Filter that is represented by this Registration.

The given map of initialization parameters is processed by-value, i.e., for each initialization parameter contained in the map, this method calls setInitParameter(String, String). If that method would return false for any of the initialization parameters in the given map, no updates will be performed, and false will be returned. Likewise, if the map contains an initialization parameter with a null name or value, no updates will be performed, and an IllegalArgumentException will be thrown.

The returned set is not backed by the Registration object, so changes in the returned set are not reflected in the Registration object, and vice-versa.

Parameters
initParameters:Map<String, String>

the initialization parameters

Returns:Set<String>

the (possibly empty) Set of initialization parameter names that are in conflict

Annotations
@Override