public class ApplicationServletRegistration extends Object implements ServletRegistration.Dynamic
ServletRegistration.Dynamic
Constructor and Description |
---|
ApplicationServletRegistration(Wrapper wrapper,
Context context) |
Modifier and Type | Method and Description |
---|---|
Set<String> |
addMapping(String... urlPatterns)
Adds a servlet mapping with the given URL patterns for the Servlet
represented by this ServletRegistration.
|
String |
getClassName()
Obtain the name of the implementation class for the Servlet.
|
String |
getInitParameter(String name)
Get the value of an initialisation parameter.
|
Map<String,String> |
getInitParameters()
Get the names and values of all the initialisation parameters.
|
Collection<String> |
getMappings()
Gets the currently available mappings of the Servlet represented by this
ServletRegistration.
|
String |
getName()
Obtain the name of the Servlet.
|
String |
getRunAsRole()
Obtain the name of the user / group under which the Servlet has been
configured to run.
|
void |
setAsyncSupported(boolean asyncSupported)
Mark this Servlet/Filter as supported asynchronous processing.
|
boolean |
setInitParameter(String name,
String value)
Add an initialisation parameter if not already added.
|
Set<String> |
setInitParameters(Map<String,String> initParameters)
Add multiple initialisation parameters.
|
void |
setLoadOnStartup(int loadOnStartup)
Set the loadOnStartup order for the Servlet
|
void |
setMultipartConfig(MultipartConfigElement multipartConfig)
Set the multi-part configuration for the associated Servlet.
|
void |
setRunAsRole(String roleName)
Set the name of the user / group under which the Servlet should be
configured to run.
|
Set<String> |
setServletSecurity(ServletSecurityElement constraint)
Add security constraints to this Servlet.
|
public String getClassName()
javax.servlet.Registration
getClassName
in interface Registration
public String getInitParameter(String name)
javax.servlet.Registration
getInitParameter
in interface Registration
name
- The initialisation parameter whose value is requiredpublic Map<String,String> getInitParameters()
javax.servlet.Registration
getInitParameters
in interface Registration
public String getName()
javax.servlet.Registration
getName
in interface Registration
public boolean setInitParameter(String name, String value)
javax.servlet.Registration
setInitParameter
in interface Registration
name
- Name of initialisation parametervalue
- Value of initialisation parametertrue
if the initialisation parameter was set,
false
if the initialisation parameter was not set
because an initialisation parameter of the same name already
existedpublic Set<String> setInitParameters(Map<String,String> initParameters)
javax.servlet.Registration
setInitParameters
in interface Registration
initParameters
- The initialisation parameters to addpublic void setAsyncSupported(boolean asyncSupported)
javax.servlet.Registration.Dynamic
setAsyncSupported
in interface Registration.Dynamic
asyncSupported
- Should this Servlet/Filter support
asynchronous processingpublic void setLoadOnStartup(int loadOnStartup)
javax.servlet.ServletRegistration.Dynamic
setLoadOnStartup
in interface ServletRegistration.Dynamic
loadOnStartup
- The position in the order the Servlet should be
started (higher numbers are started after lower
numbers)public void setMultipartConfig(MultipartConfigElement multipartConfig)
javax.servlet.ServletRegistration.Dynamic
null
as the new
value.setMultipartConfig
in interface ServletRegistration.Dynamic
multipartConfig
- The configuration to associate with the
Servletpublic void setRunAsRole(String roleName)
javax.servlet.ServletRegistration.Dynamic
setRunAsRole
in interface ServletRegistration.Dynamic
roleName
- name of the user / group or null
if nonepublic Set<String> setServletSecurity(ServletSecurityElement constraint)
javax.servlet.ServletRegistration.Dynamic
setServletSecurity
in interface ServletRegistration.Dynamic
constraint
- new security constraints for this Servletpublic Set<String> addMapping(String... urlPatterns)
javax.servlet.ServletRegistration
addMapping
in interface ServletRegistration
urlPatterns
- The URL patterns that this Servlet should be mapped topublic Collection<String> getMappings()
javax.servlet.ServletRegistration
getMappings
in interface ServletRegistration
public String getRunAsRole()
javax.servlet.ServletRegistration
getRunAsRole
in interface ServletRegistration
null
if none has been
specifiedCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.