Package io.undertow.servlet.core
Class DeploymentImpl
- java.lang.Object
-
- io.undertow.servlet.core.DeploymentImpl
-
- All Implemented Interfaces:
Deployment
public class DeploymentImpl extends java.lang.Object implements Deployment
Class that represents the mutable state associated with a servlet deployment that is built up during the bootstrap process.Classes calling deployment methods during bootstrap must be aware of ordering concerns.
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description DeploymentImpl(DeploymentManager deploymentManager, DeploymentInfo deploymentInfo, ServletContainer servletContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <C,T>
ThreadSetupHandler.Action<C,T>createThreadSetupAction(ThreadSetupHandler.Action<C,T> target)
ApplicationListeners
getApplicationListeners()
java.util.concurrent.Executor
getAsyncExecutor()
java.util.List<io.undertow.security.api.AuthenticationMechanism>
getAuthenticationMechanisms()
java.nio.charset.Charset
getDefaultCharset()
Deprecated.java.nio.charset.Charset
getDefaultRequestCharset()
java.nio.charset.Charset
getDefaultResponseCharset()
DeploymentInfo
getDeploymentInfo()
DeploymentManager.State
getDeploymentState()
ErrorPages
getErrorPages()
java.util.concurrent.Executor
getExecutor()
ManagedFilters
getFilters()
io.undertow.server.HttpHandler
getHandler()
java.util.List<Lifecycle>
getLifecycleObjects()
java.util.Map<java.lang.String,java.lang.String>
getMimeExtensionMappings()
ServletContainer
getServletContainer()
ServletContextImpl
getServletContext()
ServletDispatcher
getServletDispatcher()
ServletPathMatches
getServletPaths()
ManagedServlets
getServlets()
io.undertow.server.session.SessionManager
getSessionManager()
void
setAuthenticationMechanisms(java.util.List<io.undertow.security.api.AuthenticationMechanism> authenticationMechanisms)
void
setDefaultCharset(java.nio.charset.Charset defaultCharset)
Deprecated.void
setDefaultRequestCharset(java.nio.charset.Charset defaultRequestCharset)
void
setDefaultResponseCharset(java.nio.charset.Charset defaultResponseCharset)
void
setErrorPages(ErrorPages errorPages)
void
setInitialHandler(io.undertow.server.HttpHandler initialHandler)
void
setMimeExtensionMappings(java.util.Map<java.lang.String,java.lang.String> mimeExtensionMappings)
java.util.Set<java.lang.String>
tryAddServletMappings(ServletInfo servletInfo, java.lang.String... urlPatterns)
Attempts to add a servlet mapping usingServletRegistration.addMapping(String...)
-
-
-
Constructor Detail
-
DeploymentImpl
public DeploymentImpl(DeploymentManager deploymentManager, DeploymentInfo deploymentInfo, ServletContainer servletContainer)
-
-
Method Detail
-
getServletContainer
public ServletContainer getServletContainer()
- Specified by:
getServletContainer
in interfaceDeployment
-
getServlets
public ManagedServlets getServlets()
- Specified by:
getServlets
in interfaceDeployment
-
getFilters
public ManagedFilters getFilters()
- Specified by:
getFilters
in interfaceDeployment
-
getDeploymentInfo
public DeploymentInfo getDeploymentInfo()
- Specified by:
getDeploymentInfo
in interfaceDeployment
-
getApplicationListeners
public ApplicationListeners getApplicationListeners()
- Specified by:
getApplicationListeners
in interfaceDeployment
-
getServletContext
public ServletContextImpl getServletContext()
- Specified by:
getServletContext
in interfaceDeployment
-
getHandler
public io.undertow.server.HttpHandler getHandler()
- Specified by:
getHandler
in interfaceDeployment
-
setInitialHandler
public void setInitialHandler(io.undertow.server.HttpHandler initialHandler)
-
getLifecycleObjects
public java.util.List<Lifecycle> getLifecycleObjects()
-
getServletPaths
public ServletPathMatches getServletPaths()
- Specified by:
getServletPaths
in interfaceDeployment
-
createThreadSetupAction
public <C,T> ThreadSetupHandler.Action<C,T> createThreadSetupAction(ThreadSetupHandler.Action<C,T> target)
- Specified by:
createThreadSetupAction
in interfaceDeployment
-
getErrorPages
public ErrorPages getErrorPages()
- Specified by:
getErrorPages
in interfaceDeployment
-
setErrorPages
public void setErrorPages(ErrorPages errorPages)
-
getMimeExtensionMappings
public java.util.Map<java.lang.String,java.lang.String> getMimeExtensionMappings()
- Specified by:
getMimeExtensionMappings
in interfaceDeployment
-
setMimeExtensionMappings
public void setMimeExtensionMappings(java.util.Map<java.lang.String,java.lang.String> mimeExtensionMappings)
-
getServletDispatcher
public ServletDispatcher getServletDispatcher()
- Specified by:
getServletDispatcher
in interfaceDeployment
-
getSessionManager
public io.undertow.server.session.SessionManager getSessionManager()
- Specified by:
getSessionManager
in interfaceDeployment
- Returns:
- The session manager
-
getExecutor
public java.util.concurrent.Executor getExecutor()
- Specified by:
getExecutor
in interfaceDeployment
- Returns:
- The executor used for servlet requests. May be null in which case the XNIO worker is used
-
getAsyncExecutor
public java.util.concurrent.Executor getAsyncExecutor()
- Specified by:
getAsyncExecutor
in interfaceDeployment
- Returns:
- The executor used for async request dispatches. May be null in which case the XNIO worker is used
-
getDefaultCharset
@Deprecated public java.nio.charset.Charset getDefaultCharset()
Deprecated.- Specified by:
getDefaultCharset
in interfaceDeployment
-
getDefaultRequestCharset
public java.nio.charset.Charset getDefaultRequestCharset()
- Specified by:
getDefaultRequestCharset
in interfaceDeployment
-
getDefaultResponseCharset
public java.nio.charset.Charset getDefaultResponseCharset()
- Specified by:
getDefaultResponseCharset
in interfaceDeployment
-
setAuthenticationMechanisms
public void setAuthenticationMechanisms(java.util.List<io.undertow.security.api.AuthenticationMechanism> authenticationMechanisms)
-
getAuthenticationMechanisms
public java.util.List<io.undertow.security.api.AuthenticationMechanism> getAuthenticationMechanisms()
- Specified by:
getAuthenticationMechanisms
in interfaceDeployment
- Returns:
- The list of authentication mechanisms configured for this deployment
-
getDeploymentState
public DeploymentManager.State getDeploymentState()
- Specified by:
getDeploymentState
in interfaceDeployment
-
tryAddServletMappings
public java.util.Set<java.lang.String> tryAddServletMappings(ServletInfo servletInfo, java.lang.String... urlPatterns)
Description copied from interface:Deployment
Attempts to add a servlet mapping usingServletRegistration.addMapping(String...)
- Specified by:
tryAddServletMappings
in interfaceDeployment
- Returns:
- true if the addition was sucessful
-
setDefaultCharset
@Deprecated public void setDefaultCharset(java.nio.charset.Charset defaultCharset)
Deprecated.
-
setDefaultRequestCharset
public void setDefaultRequestCharset(java.nio.charset.Charset defaultRequestCharset)
-
setDefaultResponseCharset
public void setDefaultResponseCharset(java.nio.charset.Charset defaultResponseCharset)
-
-