Package javax.servlet
Interface Registration
- 
- All Known Subinterfaces:
- FilterRegistration,- FilterRegistration.Dynamic,- Registration.Dynamic,- ServletRegistration,- ServletRegistration.Dynamic
 
 public interface RegistrationCommon interface for the registration of Filters and Servlets.- Since:
- Servlet 3.0
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceRegistration.DynamicInterface through which a Servlet or Filter registered via one of the addServlet or addFilter methods, respectively, on ServletContext may be further configured.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetClassName()Obtain the name of the implementation class for the Servlet.java.lang.StringgetInitParameter(java.lang.String name)Get the value of an initialisation parameter.java.util.Map<java.lang.String,java.lang.String>getInitParameters()Get the names and values of all the initialisation parameters.java.lang.StringgetName()Obtain the name of the Servlet.booleansetInitParameter(java.lang.String name, java.lang.String value)Add an initialisation parameter if not already added.java.util.Set<java.lang.String>setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)Add multiple initialisation parameters.
 
- 
- 
- 
Method Detail- 
getNamejava.lang.String getName() Obtain the name of the Servlet.- Returns:
- the name of the Servlet.
 
 - 
getClassNamejava.lang.String getClassName() Obtain the name of the implementation class for the Servlet.- Returns:
- the name of the implementation class for the Servlet.
 
 - 
setInitParameterboolean setInitParameter(java.lang.String name, java.lang.String value)Add an initialisation parameter if not already added.- Parameters:
- name- Name of initialisation parameter
- value- Value of initialisation parameter
- Returns:
- trueif the initialisation parameter was set,- falseif the initialisation parameter was not set because an initialisation parameter of the same name already existed
- Throws:
- java.lang.IllegalArgumentException- if name or value is- null
- java.lang.IllegalStateException- if the ServletContext associated with this registration has already been initialised
 
 - 
getInitParameterjava.lang.String getInitParameter(java.lang.String name) Get the value of an initialisation parameter.- Parameters:
- name- The initialisation parameter whose value is required
- Returns:
- The value of the named initialisation parameter
 
 - 
setInitParametersjava.util.Set<java.lang.String> setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters) Add multiple initialisation parameters. If any of the supplied initialisation parameter conflicts with an existing initialisation parameter, no updates will be performed.- Parameters:
- initParameters- The initialisation parameters to add
- Returns:
- The set of initialisation parameter names that conflicted with existing initialisation parameter. If there are no conflicts, this Set will be empty.
- Throws:
- java.lang.IllegalArgumentException- if any of the supplied initialisation parameters have a null name or value
- java.lang.IllegalStateException- if the ServletContext associated with this registration has already been initialised
 
 - 
getInitParametersjava.util.Map<java.lang.String,java.lang.String> getInitParameters() Get the names and values of all the initialisation parameters.- Returns:
- A Map of initialisation parameter names and associated values keyed by name
 
 
- 
 
-