cloud.piranha.api.WebApplication
, javax.servlet.ServletContext
public class DefaultWebApplication
extends java.lang.Object
implements cloud.piranha.api.WebApplication
The filters
field is backed by a LinkedHashMap so we get an
insertion-order key set. If you change this, be aware that methods using this
field should be changed to account for that.
The servlets
field is backed by a LinkedHashMap so we get an
insertion-order key set. If you change this, be aware that methods using this
field should be changed to account for that.
Modifier and Type | Field | Description |
---|---|---|
protected cloud.piranha.api.AnnotationManager |
annotationManager |
Stores the annotation manager.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
attributes |
Stores the attributes.
|
protected java.lang.ClassLoader |
classLoader |
Stores the class loader.
|
protected java.util.List<javax.servlet.ServletContextAttributeListener> |
contextAttributeListeners |
Stores the servlet context attribute listeners.
|
protected java.util.ArrayList<javax.servlet.ServletContextListener> |
contextListeners |
Stores the servlet context listeners.
|
protected java.lang.String |
contextPath |
Stores the context path.
|
protected boolean |
distributable |
Stores the boolean flag indicating if the web application is distributable.
|
protected static int |
ERROR |
Stores the ERROR constant.
|
protected java.util.Map<java.lang.Integer,java.lang.String> |
errorPagesByCode |
|
protected java.util.Map<java.lang.String,java.lang.String> |
errorPagesByException |
|
protected java.util.Map<java.lang.String,DefaultFilterEnvironment> |
filters |
Stores the filters.
|
protected cloud.piranha.api.HttpRequestManager |
httpRequestManager |
Stores the request manager.
|
protected cloud.piranha.api.HttpSessionManager |
httpSessionManager |
Stores the session manager.
|
protected static int |
INITIALIZED |
Stores the INITIALIZED constant.
|
protected java.util.List<javax.servlet.ServletContainerInitializer> |
initializers |
Stores the servlet container initializers.
|
protected java.util.Map<java.lang.String,java.lang.String> |
initParameters |
Stores the init parameters.
|
protected cloud.piranha.api.JspManager |
jspManager |
Stores the JSP manager.
|
protected cloud.piranha.api.LoggingManager |
loggingManager |
Stores the logging manager.
|
protected cloud.piranha.api.MimeTypeManager |
mimeTypeManager |
Stores the mime type manager.
|
protected cloud.piranha.api.ObjectInstanceManager |
objectInstanceManager |
Stores the object instance manager.
|
protected java.lang.String |
requestCharacterEncoding |
Stores the request character encoding.
|
protected java.util.List<javax.servlet.ServletRequestListener> |
requestListeners |
Stores the servlet request listeners.
|
protected java.util.Map<javax.servlet.ServletRequest,javax.servlet.ServletResponse> |
requests |
Stores the active requests and the associated response.
|
protected cloud.piranha.resource.api.ResourceManager |
resourceManager |
Stores the resource manager.
|
protected java.lang.String |
responseCharacterEncoding |
Stores the response character encoding.
|
protected java.util.Map<javax.servlet.ServletResponse,javax.servlet.ServletRequest> |
responses |
Stores the active responses and the associated requests.
|
protected cloud.piranha.api.SecurityManager |
securityManager |
Stores the security manager.
|
protected static int |
SERVICING |
Stores the SERVICING constant.
|
protected java.lang.String |
servletContextName |
Stores the servlet context name.
|
protected java.util.Map<java.lang.String,DefaultServletEnvironment> |
servlets |
Stores the servlets.
|
protected static int |
SETUP |
Stores the SETUP constant.
|
protected int |
status |
Stores the status.
|
protected java.lang.String |
virtualServerName |
Stores the virtual server name.
|
protected cloud.piranha.api.WebApplicationRequestMapper |
webApplicationRequestMapper |
Stores the web application request mapper.
|
Constructor | Description |
---|---|
DefaultWebApplication() |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addErrorPage(int code,
java.lang.String location) |
|
void |
addErrorPage(java.lang.String exception,
java.lang.String location) |
|
javax.servlet.FilterRegistration.Dynamic |
addFilter(java.lang.String filterName,
java.lang.Class<? extends javax.servlet.Filter> filterClass) |
Add the filter.
|
javax.servlet.FilterRegistration.Dynamic |
addFilter(java.lang.String filterName,
java.lang.String className) |
Add the filter.
|
javax.servlet.FilterRegistration.Dynamic |
addFilter(java.lang.String filterName,
javax.servlet.Filter filter) |
Add the filter.
|
java.util.Set<java.lang.String> |
addFilterMapping(java.lang.String filterName,
boolean isMatchAfter,
java.lang.String... urlPatterns) |
|
java.util.Set<java.lang.String> |
addFilterMapping(java.lang.String filterName,
java.lang.String... urlPatterns) |
|
void |
addInitializer(java.lang.String className) |
Add a servlet container initializer.
|
void |
addInitializer(javax.servlet.ServletContainerInitializer servletContainerInitializer) |
|
javax.servlet.ServletRegistration.Dynamic |
addJspFile(java.lang.String servletName,
java.lang.String jspFile) |
Add a JSP file.
|
void |
addListener(java.lang.Class<? extends java.util.EventListener> type) |
Add the listener.
|
void |
addListener(java.lang.String className) |
Add listener.
|
<T extends java.util.EventListener> |
addListener(T listener) |
Add the listener.
|
void |
addResource(cloud.piranha.resource.api.Resource resource) |
Add the resource.
|
javax.servlet.ServletRegistration.Dynamic |
addServlet(java.lang.String servletName,
java.lang.Class<? extends javax.servlet.Servlet> servletClass) |
Add the servlet.
|
javax.servlet.ServletRegistration.Dynamic |
addServlet(java.lang.String servletName,
java.lang.String className) |
Add the servlet.
|
javax.servlet.ServletRegistration.Dynamic |
addServlet(java.lang.String servletName,
javax.servlet.Servlet servlet) |
Add the servlet.
|
java.util.Set<java.lang.String> |
addServletMapping(java.lang.String servletName,
java.lang.String... urlPatterns) |
Add the servlet mapping.
|
<T extends javax.servlet.Filter> |
createFilter(java.lang.Class<T> filterClass) |
Create the filter.
|
<T extends java.util.EventListener> |
createListener(java.lang.Class<T> clazz) |
Create the listener.
|
<T extends javax.servlet.Servlet> |
createServlet(java.lang.Class<T> servletClass) |
Create the servlet.
|
void |
declareRoles(java.lang.String... roles) |
Declare roles.
|
void |
destroy() |
Destroy the web application.
|
protected java.util.List<DefaultFilterEnvironment> |
findFilterEnvironments(javax.servlet.http.HttpServletRequest request) |
Find the filter environments.
|
cloud.piranha.api.AnnotationManager |
getAnnotationManager() |
|
java.lang.Object |
getAttribute(java.lang.String name) |
Get the attribute.
|
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
Get the attribute names.
|
java.lang.ClassLoader |
getClassLoader() |
Get the class loader.
|
javax.servlet.ServletContext |
getContext(java.lang.String uripath) |
Get the servlet context for the given uripath.
|
java.lang.String |
getContextPath() |
Get the context path.
|
java.util.Set<javax.servlet.SessionTrackingMode> |
getDefaultSessionTrackingModes() |
Get the default session tracking modes.
|
boolean |
getDenyUncoveredHttpMethods() |
Are we denying uncovered HTTP methods.
|
int |
getEffectiveMajorVersion() |
Get the effective major version.
|
int |
getEffectiveMinorVersion() |
Get the effective minor version.
|
java.util.Set<javax.servlet.SessionTrackingMode> |
getEffectiveSessionTrackingModes() |
Get the effective tracking modes.
|
javax.servlet.FilterRegistration |
getFilterRegistration(java.lang.String filterName) |
Get the filter registration.
|
java.util.Map<java.lang.String,? extends javax.servlet.FilterRegistration> |
getFilterRegistrations() |
Get the filter registrations.
|
cloud.piranha.api.HttpRequestManager |
getHttpRequestManager() |
|
cloud.piranha.api.HttpSessionManager |
getHttpSessionManager() |
Get the session manager.
|
java.lang.String |
getInitParameter(java.lang.String name) |
Get the init parameter.
|
java.util.Enumeration<java.lang.String> |
getInitParameterNames() |
Get the init parameter names.
|
javax.servlet.descriptor.JspConfigDescriptor |
getJspConfigDescriptor() |
Get the JSP config descriptor.
|
int |
getMajorVersion() |
Get the major version.
|
java.util.Collection<java.lang.String> |
getMappings(java.lang.String servletName) |
Get the servlet mappings for the given servlet.
|
java.lang.String |
getMimeType(java.lang.String filename) |
Get the mime type.
|
cloud.piranha.api.MimeTypeManager |
getMimeTypeManager() |
Get the mime type manager.
|
int |
getMinorVersion() |
Get the minor version.
|
javax.servlet.RequestDispatcher |
getNamedDispatcher(java.lang.String name) |
Get the name request dispatcher.
|
protected javax.servlet.RequestDispatcher |
getNamedDispatcher(java.lang.String name,
java.lang.String path) |
Get the name request dispatcher.
|
cloud.piranha.api.ObjectInstanceManager |
getObjectInstanceManager() |
Get the DependencyInjectionManager.
|
java.lang.String |
getRealPath(java.lang.String path) |
Get the real path.
|
javax.servlet.ServletRequest |
getRequest(javax.servlet.ServletResponse response) |
Get the request associated with the response.
|
java.lang.String |
getRequestCharacterEncoding() |
Get the default request character encoding.
|
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String path) |
Get the request dispatcher.
|
java.net.URL |
getResource(java.lang.String location) |
Get the resource.
|
java.io.InputStream |
getResourceAsStream(java.lang.String location) |
Get the resource as a stream.
|
java.util.Set<java.lang.String> |
getResourcePaths(java.lang.String path) |
Get the resource paths.
|
javax.servlet.ServletResponse |
getResponse(javax.servlet.ServletRequest request) |
Get the response.
|
java.lang.String |
getResponseCharacterEncoding() |
Get the default response character encoding.
|
cloud.piranha.api.SecurityManager |
getSecurityManager() |
Get the security manager.
|
java.lang.String |
getServerInfo() |
Get the server info.
|
javax.servlet.Servlet |
getServlet(java.lang.String name) |
Deprecated.
|
java.lang.String |
getServletContextName() |
Get the servlet context name (aka display-name).
|
java.util.Enumeration<java.lang.String> |
getServletNames() |
Deprecated.
|
javax.servlet.ServletRegistration |
getServletRegistration(java.lang.String servletName) |
Get the servlet registration.
|
java.util.Map<java.lang.String,? extends javax.servlet.ServletRegistration> |
getServletRegistrations() |
Get the servlet registrations.
|
java.util.Enumeration<javax.servlet.Servlet> |
getServlets() |
Deprecated.
|
javax.servlet.SessionCookieConfig |
getSessionCookieConfig() |
Get the session cookie config.
|
int |
getSessionTimeout() |
Get the default session timeout.
|
java.lang.String |
getVirtualServerName() |
Get the virtual server name.
|
void |
initialize() |
Initialize the web application.
|
void |
initializeFilters() |
Initialize the filters.
|
void |
initializeFinish() |
Finish the initialization.
|
void |
initializeInitializers() |
Initialize the servlet container initializers.
|
void |
initializeServlets() |
Initialize the servlets.
|
boolean |
isDistributable() |
Is the web application distributable.
|
void |
linkRequestAndResponse(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
Link the request and response.
|
void |
log(java.lang.Exception exception,
java.lang.String message) |
Deprecated.
|
void |
log(java.lang.String message) |
Log a message.
|
void |
log(java.lang.String message,
java.lang.Throwable throwable) |
Log a message.
|
void |
removeAttribute(java.lang.String name) |
Remove the attribute with the given name.
|
void |
service(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
Service the request using this web application.
|
void |
setAnnotationManager(cloud.piranha.api.AnnotationManager annotationManager) |
|
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
Set the attribute.
|
void |
setClassLoader(java.lang.ClassLoader classLoader) |
Set the class-loader.
|
void |
setContextPath(java.lang.String contextPath) |
Set the context path.
|
void |
setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods) |
Set if we are denying uncovered HTTP methods.
|
void |
setDistributable(boolean distributable) |
Set if the web application is distributable.
|
void |
setHttpRequestManager(cloud.piranha.api.HttpRequestManager httpRequestManager) |
|
void |
setHttpSessionManager(cloud.piranha.api.HttpSessionManager httpSessionManager) |
Set the HTTP session manager.
|
boolean |
setInitParameter(java.lang.String name,
java.lang.String value) |
Set the init parameter.
|
void |
setJspManager(cloud.piranha.api.JspManager jspManager) |
Set the JSP manager.
|
void |
setLoggingManager(cloud.piranha.api.LoggingManager loggingManager) |
Set the logging manager.
|
void |
setMimeTypeManager(cloud.piranha.api.MimeTypeManager mimeTypeManager) |
Set the mimeType manager.
|
void |
setObjectInstanceManager(cloud.piranha.api.ObjectInstanceManager objectInstanceManager) |
Set the object instance manager.
|
void |
setRequestCharacterEncoding(java.lang.String requestCharacterEncoding) |
Set the default request character encoding.
|
void |
setResourceManager(cloud.piranha.resource.api.ResourceManager resourceManager) |
Set the resource manager.
|
void |
setResponseCharacterEncoding(java.lang.String responseCharacterEncoding) |
Set the default response character encoding.
|
void |
setSecurityManager(cloud.piranha.api.SecurityManager securityManager) |
Set the security manager.
|
void |
setServletContextName(java.lang.String servletContextName) |
Set the servlet context name.
|
void |
setSessionTimeout(int sessionTimeout) |
Set the default session timeout.
|
void |
setSessionTrackingModes(java.util.Set<javax.servlet.SessionTrackingMode> sessionTrackingModes) |
Set the session tracking modes.
|
void |
setVirtualServerName(java.lang.String virtualServerName) |
Set the virtual server name.
|
void |
setWebApplicationRequestMapper(cloud.piranha.api.WebApplicationRequestMapper webApplicationRequestMapper) |
Set the web application request mapper.
|
void |
start() |
Start servicing.
|
void |
stop() |
Stop servicing.
|
void |
unlinkRequestAndResponse(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
Unlink the request and response.
|
protected void |
verifyState(int desiredStatus,
java.lang.String message) |
Verify the web application state.
|
protected static final int INITIALIZED
protected static final int ERROR
protected static final int SETUP
protected static final int SERVICING
protected java.lang.ClassLoader classLoader
protected java.lang.String contextPath
protected boolean distributable
protected java.lang.String servletContextName
protected java.lang.String virtualServerName
protected java.lang.String responseCharacterEncoding
protected int status
protected final java.util.Map<javax.servlet.ServletRequest,javax.servlet.ServletResponse> requests
protected final java.util.Map<javax.servlet.ServletResponse,javax.servlet.ServletRequest> responses
protected final java.util.List<javax.servlet.ServletContainerInitializer> initializers
protected final java.util.Map<java.lang.String,java.lang.String> initParameters
protected final java.util.Map<java.lang.String,java.lang.Object> attributes
protected final java.util.Map<java.lang.String,DefaultServletEnvironment> servlets
protected final java.util.Map<java.lang.String,DefaultFilterEnvironment> filters
protected final java.util.Map<java.lang.Integer,java.lang.String> errorPagesByCode
protected final java.util.Map<java.lang.String,java.lang.String> errorPagesByException
protected final java.util.List<javax.servlet.ServletContextAttributeListener> contextAttributeListeners
protected final java.util.ArrayList<javax.servlet.ServletContextListener> contextListeners
protected final java.util.List<javax.servlet.ServletRequestListener> requestListeners
protected cloud.piranha.api.ObjectInstanceManager objectInstanceManager
protected cloud.piranha.api.AnnotationManager annotationManager
protected cloud.piranha.resource.api.ResourceManager resourceManager
protected cloud.piranha.api.HttpSessionManager httpSessionManager
protected cloud.piranha.api.SecurityManager securityManager
protected cloud.piranha.api.JspManager jspManager
protected cloud.piranha.api.LoggingManager loggingManager
protected cloud.piranha.api.HttpRequestManager httpRequestManager
protected cloud.piranha.api.MimeTypeManager mimeTypeManager
protected java.lang.String requestCharacterEncoding
protected cloud.piranha.api.WebApplicationRequestMapper webApplicationRequestMapper
public javax.servlet.FilterRegistration.Dynamic addFilter(java.lang.String filterName, java.lang.String className)
addFilter
in interface javax.servlet.ServletContext
filterName
- the filter name.className
- the class name.public javax.servlet.FilterRegistration.Dynamic addFilter(java.lang.String filterName, java.lang.Class<? extends javax.servlet.Filter> filterClass)
addFilter
in interface javax.servlet.ServletContext
filterName
- the filter name.filterClass
- the filter class.ServletContext.addFilter(java.lang.String, java.lang.Class)
public javax.servlet.FilterRegistration.Dynamic addFilter(java.lang.String filterName, javax.servlet.Filter filter)
addFilter
in interface javax.servlet.ServletContext
filterName
- the filter name.filter
- the filter.public java.util.Set<java.lang.String> addFilterMapping(java.lang.String filterName, java.lang.String... urlPatterns)
addFilterMapping
in interface cloud.piranha.api.WebApplication
public java.util.Set<java.lang.String> addFilterMapping(java.lang.String filterName, boolean isMatchAfter, java.lang.String... urlPatterns)
addFilterMapping
in interface cloud.piranha.api.WebApplication
public void addInitializer(java.lang.String className)
addInitializer
in interface cloud.piranha.api.WebApplication
className
- the class name.public void addInitializer(javax.servlet.ServletContainerInitializer servletContainerInitializer)
addInitializer
in interface cloud.piranha.api.WebApplication
public javax.servlet.ServletRegistration.Dynamic addJspFile(java.lang.String servletName, java.lang.String jspFile)
addJspFile
in interface javax.servlet.ServletContext
servletName
- the name of the servlet.jspFile
- the JSP file.public void addListener(java.lang.String className)
addListener
in interface javax.servlet.ServletContext
className
- the class name.public void addListener(java.lang.Class<? extends java.util.EventListener> type)
addListener
in interface javax.servlet.ServletContext
type
- the type.public <T extends java.util.EventListener> void addListener(T listener)
addListener
in interface javax.servlet.ServletContext
T
- the type.listener
- the listenerpublic void addResource(cloud.piranha.resource.api.Resource resource)
addResource
in interface cloud.piranha.api.WebApplication
resource
- the resource.public javax.servlet.ServletRegistration.Dynamic addServlet(java.lang.String servletName, java.lang.Class<? extends javax.servlet.Servlet> servletClass)
addServlet
in interface javax.servlet.ServletContext
servletName
- the servlet name.servletClass
- the class type.public javax.servlet.ServletRegistration.Dynamic addServlet(java.lang.String servletName, java.lang.String className)
addServlet
in interface javax.servlet.ServletContext
servletName
- the servlet name.className
- the class name.public javax.servlet.ServletRegistration.Dynamic addServlet(java.lang.String servletName, javax.servlet.Servlet servlet)
addServlet
in interface javax.servlet.ServletContext
servletName
- the servlet name.servlet
- the servlet.public java.util.Set<java.lang.String> addServletMapping(java.lang.String servletName, java.lang.String... urlPatterns)
addServletMapping
in interface cloud.piranha.api.WebApplication
servletName
- the servlet name.urlPatterns
- the URL patterns.public void addErrorPage(int code, java.lang.String location)
addErrorPage
in interface cloud.piranha.api.WebApplication
public void addErrorPage(java.lang.String exception, java.lang.String location)
addErrorPage
in interface cloud.piranha.api.WebApplication
public <T extends javax.servlet.Filter> T createFilter(java.lang.Class<T> filterClass) throws javax.servlet.ServletException
createFilter
in interface javax.servlet.ServletContext
T
- the return type.filterClass
- the filter class.javax.servlet.ServletException
- when a Filter error occurs.public <T extends java.util.EventListener> T createListener(java.lang.Class<T> clazz) throws javax.servlet.ServletException
createListener
in interface javax.servlet.ServletContext
T
- the type.clazz
- the class of the listener to create.javax.servlet.ServletException
- when it fails to create the listener.public <T extends javax.servlet.Servlet> T createServlet(java.lang.Class<T> servletClass) throws javax.servlet.ServletException
createServlet
in interface javax.servlet.ServletContext
T
- the return type.servletClass
- the servlet class.javax.servlet.ServletException
- when a Servlet error occurs.public void declareRoles(java.lang.String... roles)
declareRoles
in interface javax.servlet.ServletContext
roles
- the roles.public void destroy()
destroy
in interface cloud.piranha.api.WebApplication
protected java.util.List<DefaultFilterEnvironment> findFilterEnvironments(javax.servlet.http.HttpServletRequest request)
request
- the HTTP servlet request.public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface javax.servlet.ServletContext
name
- the attribute name.public java.util.Enumeration<java.lang.String> getAttributeNames()
getAttributeNames
in interface javax.servlet.ServletContext
public boolean getDenyUncoveredHttpMethods()
getDenyUncoveredHttpMethods
in interface cloud.piranha.api.WebApplication
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface javax.servlet.ServletContext
public javax.servlet.ServletContext getContext(java.lang.String uripath)
getContext
in interface javax.servlet.ServletContext
uripath
- the uripath.public java.lang.String getContextPath()
getContextPath
in interface javax.servlet.ServletContext
public java.util.Set<javax.servlet.SessionTrackingMode> getDefaultSessionTrackingModes()
getDefaultSessionTrackingModes
in interface javax.servlet.ServletContext
public cloud.piranha.api.ObjectInstanceManager getObjectInstanceManager()
getObjectInstanceManager
in interface cloud.piranha.api.WebApplication
public int getEffectiveMajorVersion()
getEffectiveMajorVersion
in interface javax.servlet.ServletContext
public int getEffectiveMinorVersion()
getEffectiveMinorVersion
in interface javax.servlet.ServletContext
public java.util.Set<javax.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes()
getEffectiveSessionTrackingModes
in interface javax.servlet.ServletContext
public javax.servlet.FilterRegistration getFilterRegistration(java.lang.String filterName)
getFilterRegistration
in interface javax.servlet.ServletContext
filterName
- the filter name.public java.util.Map<java.lang.String,? extends javax.servlet.FilterRegistration> getFilterRegistrations()
getFilterRegistrations
in interface javax.servlet.ServletContext
public java.lang.String getInitParameter(java.lang.String name)
getInitParameter
in interface javax.servlet.ServletContext
name
- the init parameter name.public java.util.Enumeration<java.lang.String> getInitParameterNames()
getInitParameterNames
in interface javax.servlet.ServletContext
public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()
getJspConfigDescriptor
in interface javax.servlet.ServletContext
public int getMajorVersion()
getMajorVersion
in interface javax.servlet.ServletContext
public java.util.Collection<java.lang.String> getMappings(java.lang.String servletName)
getMappings
in interface cloud.piranha.api.WebApplication
servletName
- the name of the servlet.public java.lang.String getMimeType(java.lang.String filename)
getMimeType
in interface javax.servlet.ServletContext
filename
- the filename.public cloud.piranha.api.MimeTypeManager getMimeTypeManager()
getMimeTypeManager
in interface cloud.piranha.api.WebApplication
public int getMinorVersion()
getMinorVersion
in interface javax.servlet.ServletContext
public javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String name)
getNamedDispatcher
in interface javax.servlet.ServletContext
name
- the name.protected javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String name, java.lang.String path)
name
- the name.path
- the path.public java.lang.String getRealPath(java.lang.String path)
getRealPath
in interface javax.servlet.ServletContext
path
- the pathpublic javax.servlet.ServletRequest getRequest(javax.servlet.ServletResponse response)
getRequest
in interface cloud.piranha.api.WebApplication
response
- the response.public java.lang.String getRequestCharacterEncoding()
getRequestCharacterEncoding
in interface javax.servlet.ServletContext
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
getRequestDispatcher
in interface javax.servlet.ServletContext
path
- the path.public java.lang.String getResponseCharacterEncoding()
getResponseCharacterEncoding
in interface javax.servlet.ServletContext
public java.net.URL getResource(java.lang.String location) throws java.net.MalformedURLException
getResource
in interface javax.servlet.ServletContext
location
- the location.java.net.MalformedURLException
- when the URL is malformed.public java.io.InputStream getResourceAsStream(java.lang.String location)
getResourceAsStream
in interface javax.servlet.ServletContext
location
- the resource locationpublic java.util.Set<java.lang.String> getResourcePaths(java.lang.String path)
getResourcePaths
in interface javax.servlet.ServletContext
path
- the path.public javax.servlet.ServletResponse getResponse(javax.servlet.ServletRequest request)
getResponse
in interface cloud.piranha.api.WebApplication
request
- the request.public cloud.piranha.api.SecurityManager getSecurityManager()
getSecurityManager
in interface cloud.piranha.api.WebApplication
public cloud.piranha.api.AnnotationManager getAnnotationManager()
getAnnotationManager
in interface cloud.piranha.api.WebApplication
public void setAnnotationManager(cloud.piranha.api.AnnotationManager annotationManager)
setAnnotationManager
in interface cloud.piranha.api.WebApplication
public java.lang.String getServerInfo()
getServerInfo
in interface javax.servlet.ServletContext
public javax.servlet.Servlet getServlet(java.lang.String name) throws javax.servlet.ServletException
getServlet
in interface javax.servlet.ServletContext
name
- the name of the servlet.javax.servlet.ServletException
- when a Servlet error occurs.public java.lang.String getServletContextName()
getServletContextName
in interface javax.servlet.ServletContext
public java.util.Enumeration<java.lang.String> getServletNames()
getServletNames
in interface javax.servlet.ServletContext
public javax.servlet.ServletRegistration getServletRegistration(java.lang.String servletName)
getServletRegistration
in interface javax.servlet.ServletContext
servletName
- the servlet name.public java.util.Map<java.lang.String,? extends javax.servlet.ServletRegistration> getServletRegistrations()
getServletRegistrations
in interface javax.servlet.ServletContext
public java.util.Enumeration<javax.servlet.Servlet> getServlets()
getServlets
in interface javax.servlet.ServletContext
public javax.servlet.SessionCookieConfig getSessionCookieConfig()
getSessionCookieConfig
in interface javax.servlet.ServletContext
public int getSessionTimeout()
getSessionTimeout
in interface javax.servlet.ServletContext
public cloud.piranha.api.HttpSessionManager getHttpSessionManager()
getHttpSessionManager
in interface cloud.piranha.api.WebApplication
public java.lang.String getVirtualServerName()
getVirtualServerName
in interface javax.servlet.ServletContext
public void initialize()
initialize
in interface cloud.piranha.api.WebApplication
public void initializeFinish()
initializeFinish
in interface cloud.piranha.api.WebApplication
public void initializeFilters()
initializeFilters
in interface cloud.piranha.api.WebApplication
public void initializeInitializers()
initializeInitializers
in interface cloud.piranha.api.WebApplication
public void initializeServlets()
initializeServlets
in interface cloud.piranha.api.WebApplication
public boolean isDistributable()
isDistributable
in interface cloud.piranha.api.WebApplication
public void linkRequestAndResponse(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
linkRequestAndResponse
in interface cloud.piranha.api.WebApplication
request
- the request.response
- the response.public void log(java.lang.Exception exception, java.lang.String message)
log
in interface javax.servlet.ServletContext
exception
- the exception.message
- the message.public void log(java.lang.String message, java.lang.Throwable throwable)
log
in interface javax.servlet.ServletContext
message
- the message.throwable
- the throwable.public void log(java.lang.String message)
log
in interface javax.servlet.ServletContext
message
- the message.public void removeAttribute(java.lang.String name)
removeAttribute
in interface javax.servlet.ServletContext
name
- the name.public void service(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws javax.servlet.ServletException, java.io.IOException
service
in interface cloud.piranha.api.WebApplication
request
- the servlet request.response
- the servlet response.java.io.IOException
- when an I/O error occurs.javax.servlet.ServletException
- when a servlet error occurs.public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface javax.servlet.ServletContext
name
- the attribute name.value
- the attribute value.public void setClassLoader(java.lang.ClassLoader classLoader)
setClassLoader
in interface cloud.piranha.api.WebApplication
classLoader
- the class loader.public void setContextPath(java.lang.String contextPath)
setContextPath
in interface cloud.piranha.api.WebApplication
contextPath
- the context path.public void setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods)
setDenyUncoveredHttpMethods
in interface cloud.piranha.api.WebApplication
denyUncoveredHttpMethods
- the boolean value.public void setDistributable(boolean distributable)
setDistributable
in interface cloud.piranha.api.WebApplication
distributable
- the boolean value.public void setHttpSessionManager(cloud.piranha.api.HttpSessionManager httpSessionManager)
setHttpSessionManager
in interface cloud.piranha.api.WebApplication
httpSessionManager
- the HTTP session manager.public cloud.piranha.api.HttpRequestManager getHttpRequestManager()
getHttpRequestManager
in interface cloud.piranha.api.WebApplication
public void setHttpRequestManager(cloud.piranha.api.HttpRequestManager httpRequestManager)
setHttpRequestManager
in interface cloud.piranha.api.WebApplication
public boolean setInitParameter(java.lang.String name, java.lang.String value)
setInitParameter
in interface javax.servlet.ServletContext
name
- the name.value
- the value.public void setJspManager(cloud.piranha.api.JspManager jspManager)
setJspManager
in interface cloud.piranha.api.WebApplication
jspManager
- the JSP manager.public void setLoggingManager(cloud.piranha.api.LoggingManager loggingManager)
setLoggingManager
in interface cloud.piranha.api.WebApplication
loggingManager
- the logging manager.public void setMimeTypeManager(cloud.piranha.api.MimeTypeManager mimeTypeManager)
setMimeTypeManager
in interface cloud.piranha.api.WebApplication
mimeTypeManager
- the mimeType manager.public void setObjectInstanceManager(cloud.piranha.api.ObjectInstanceManager objectInstanceManager)
setObjectInstanceManager
in interface cloud.piranha.api.WebApplication
objectInstanceManager
- the object instance manager.public void setRequestCharacterEncoding(java.lang.String requestCharacterEncoding)
setRequestCharacterEncoding
in interface javax.servlet.ServletContext
requestCharacterEncoding
- the default request character encoding.public void setResourceManager(cloud.piranha.resource.api.ResourceManager resourceManager)
setResourceManager
in interface cloud.piranha.api.WebApplication
resourceManager
- the resource manager.public void setResponseCharacterEncoding(java.lang.String responseCharacterEncoding)
setResponseCharacterEncoding
in interface javax.servlet.ServletContext
responseCharacterEncoding
- the default response character encoding.public void setSecurityManager(cloud.piranha.api.SecurityManager securityManager)
setSecurityManager
in interface cloud.piranha.api.WebApplication
securityManager
- the security manager.public void setServletContextName(java.lang.String servletContextName)
setServletContextName
in interface cloud.piranha.api.WebApplication
servletContextName
- the servlet context name.public void setSessionTrackingModes(java.util.Set<javax.servlet.SessionTrackingMode> sessionTrackingModes)
setSessionTrackingModes
in interface javax.servlet.ServletContext
sessionTrackingModes
- the session tracking modes.public void setSessionTimeout(int sessionTimeout)
setSessionTimeout
in interface javax.servlet.ServletContext
sessionTimeout
- the default session timeout.public void setVirtualServerName(java.lang.String virtualServerName)
virtualServerName
- the virtual server name.public void setWebApplicationRequestMapper(cloud.piranha.api.WebApplicationRequestMapper webApplicationRequestMapper)
setWebApplicationRequestMapper
in interface cloud.piranha.api.WebApplication
webApplicationRequestMapper
- the web application request mapper.public void start()
start
in interface cloud.piranha.api.WebApplication
public void stop()
stop
in interface cloud.piranha.api.WebApplication
public void unlinkRequestAndResponse(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
unlinkRequestAndResponse
in interface cloud.piranha.api.WebApplication
request
- the request.response
- the response.protected void verifyState(int desiredStatus, java.lang.String message)
desiredStatus
- the desired status.message
- the message.Copyright © 2020 Piranha Cloud. All rights reserved.