Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * JBoss, Home of Professional Open Source.
    * Copyright 2014 Red Hat, Inc., and individual contributors
    * as indicated by the @author tags.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an "AS IS" BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  
  package io.undertow.servlet.api;
  
  import java.io.File;
  import java.util.Arrays;
  import java.util.HashMap;
  import java.util.HashSet;
  import java.util.List;
  import java.util.Locale;
  import java.util.Map;
  import java.util.Set;
  
  
Represents a servlet deployment.

Author(s):
Stuart Douglas
  
  public class DeploymentInfo implements Cloneable {
  
      private String deploymentName;
      private String displayName;
      private String contextPath;
      private ClassLoader classLoader;
      private int majorVersion = 3;
      private int minorVersion;
      private Executor executor;
      private Executor asyncExecutor;
      private File tempDir;
      private LoginConfig loginConfig;
      private IdentityManager identityManager;
      private boolean allowNonStandardWrappers = false;
      private int defaultSessionTimeout = 60 * 30;
      private String hostName = "localhost";
      private boolean denyUncoveredHttpMethods = false;
      private boolean invalidateSessionOnLogout = false;
      private int defaultCookieVersion = 0;
      private String defaultEncoding = "ISO-8859-1";
      private String urlEncoding = null;
      private boolean ignoreFlush = false;
      private String serverName = "Undertow";
      private MetricsCollector metricsCollector = null;
      private SessionConfigWrapper sessionConfigWrapper = null;
      private boolean eagerFilterInit = false;
      private boolean disableCachingForSecuredPages = true;
      private boolean escapeErrorMessage = true;
      private ExceptionHandler exceptionHandler;
     private final Map<StringServletInfoservlets = new HashMap<>();
     private final Map<StringFilterInfofilters = new HashMap<>();
     private final List<FilterMappingInfofilterServletNameMappings = new ArrayList<>();
     private final List<FilterMappingInfofilterUrlMappings = new ArrayList<>();
     private final List<ListenerInfolisteners = new ArrayList<>();
     private final List<ThreadSetupActionthreadSetupActions = new ArrayList<>();
     private final Map<StringStringinitParameters = new HashMap<>();
     private final Map<StringObjectservletContextAttributes = new HashMap<>();
     private final Map<StringStringlocaleCharsetMapping = new HashMap<>();
     private final List<StringwelcomePages = new ArrayList<>();
     private final List<ErrorPageerrorPages = new ArrayList<>();
     private final List<MimeMappingmimeMappings = new ArrayList<>();
     private final List<SecurityConstraintsecurityConstraints = new ArrayList<>();
     private final Set<StringsecurityRoles = new HashSet<>();
     private final List<NotificationReceivernotificationReceivers = new ArrayList<>();
     private final List<LifecycleInterceptorlifecycleInterceptors = new ArrayList<>();
     private final List<SessionListenersessionListeners = new ArrayList<>();

    
additional servlet extensions
 
     private final List<ServletExtensionservletExtensions = new ArrayList<>();

    
map of additional roles that should be applied to the given principal.
 
     private final Map<StringSet<String>> principalVersusRolesMap = new HashMap<>();

    
Wrappers that are applied before the servlet initial handler, and before any servlet related object have been created. If a wrapper wants to bypass servlet entirely it should register itself here.
 
     private final List<HandlerWrapperinitialHandlerChainWrappers = new ArrayList<>();

    
Handler chain wrappers that are applied outside all other handlers, including security but after the initial servlet handler.
 
     private final List<HandlerWrapperouterHandlerChainWrappers = new ArrayList<>();

    
Handler chain wrappers that are applied just before the servlet request is dispatched. At this point the security handlers have run, and any security information is attached to the request.
 
     private final List<HandlerWrapperinnerHandlerChainWrappers = new ArrayList<>();
 
 
     public void validate() {
         if ( == null) {
             throw ..paramCannotBeNull("deploymentName");
         }
         if ( == null) {
             throw ..paramCannotBeNull("contextName");
         }
         if ( == null) {
             throw ..paramCannotBeNull("classLoader");
         }
         if ( == null) {
             throw ..paramCannotBeNull("resourceManager");
         }
         if ( == null) {
             throw ..paramCannotBeNull("classIntrospecter");
         }
         if ( == null) {
             throw ..paramCannotBeNull("defaultEncoding");
         }
 
         for (final ServletInfo servlet : this..values()) {
             servlet.validate();
         }
         for (final FilterInfo filter : this..values()) {
             filter.validate();
         }
         for (FilterMappingInfo mapping : this.) {
             if (!this..containsKey(mapping.getFilterName())) {
                 throw ..filterNotFound(mapping.getFilterName(), mapping.getMappingType() + " - " + mapping.getMapping());
             }
         }
         for (FilterMappingInfo mapping : this.) {
             if (!this..containsKey(mapping.getFilterName())) {
                 throw ..filterNotFound(mapping.getFilterName(), mapping.getMappingType() + " - " + mapping.getMapping());
             }
         }
     }
 
     public String getDeploymentName() {
         return ;
     }
 
     public DeploymentInfo setDeploymentName(final String deploymentName) {
         this. = deploymentName;
         return this;
     }
 
     public String getDisplayName() {
         return ;
     }
 
     public DeploymentInfo setDisplayName(final String displayName) {
         this. = displayName;
         return this;
     }
 
     public String getContextPath() {
         return ;
     }
 
     public DeploymentInfo setContextPath(final String contextPath) {
         this. = contextPath;
         return this;
     }
 
     public ClassLoader getClassLoader() {
         return ;
     }
 
     public DeploymentInfo setClassLoader(final ClassLoader classLoader) {
         this. = classLoader;
         return this;
     }
 
     public ResourceManager getResourceManager() {
         return ;
     }
 
     public DeploymentInfo setResourceManager(final ResourceManager resourceManager) {
         this. = resourceManager;
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo setClassIntrospecter(final ClassIntrospecter classIntrospecter) {
         this. = classIntrospecter;
         return this;
     }
 
     public boolean isAllowNonStandardWrappers() {
         return ;
     }
 
     public DeploymentInfo setAllowNonStandardWrappers(final boolean allowNonStandardWrappers) {
         this. = allowNonStandardWrappers;
         return this;
     }
 
     public int getDefaultSessionTimeout() {
         return ;
     }

    

Parameters:
defaultSessionTimeout The default session timeout, in seconds
 
     public DeploymentInfo setDefaultSessionTimeout(final int defaultSessionTimeout) {
         this. = defaultSessionTimeout;
         return this;
     }
 
     public String getDefaultEncoding() {
         return ;
     }

    
Sets the default encoding that will be used for servlet responses

Parameters:
defaultEncoding The default encoding
 
     public DeploymentInfo setDefaultEncoding(String defaultEncoding) {
         this. = defaultEncoding;
         return this;
     }
 
     public String getUrlEncoding() {
         return ;
     }

    
Sets the URL encoding. This will only take effect if the io.undertow.UndertowOptions.DECODE_URL parameter has been set to false. This allows multiple deployments in the same server to use a different URL encoding

Parameters:
urlEncoding The encoding to use
 
     public DeploymentInfo setUrlEncoding(String urlEncoding) {
         this. = urlEncoding;
         return this;
     }
 
     public DeploymentInfo addServlet(final ServletInfo servlet) {
         .put(servlet.getName(), servlet);
         return this;
     }
 
     public DeploymentInfo addServlets(final ServletInfo... servlets) {
         for (final ServletInfo servlet : servlets) {
             addServlet(servlet);
         }
         return this;
     }
 
     public DeploymentInfo addServlets(final Collection<ServletInfoservlets) {
         for (final ServletInfo servlet : servlets) {
             addServlet(servlet);
         }
         return this;
     }
 
     public Map<StringServletInfogetServlets() {
         return Collections.unmodifiableMap();
     }
 
 
     public DeploymentInfo addFilter(final FilterInfo filter) {
         .put(filter.getName(), filter);
         return this;
     }
 
     public DeploymentInfo addFilters(final FilterInfo... filters) {
         for (final FilterInfo filter : filters) {
             addFilter(filter);
         }
         return this;
     }
 
     public DeploymentInfo addFilters(final Collection<FilterInfofilters) {
         for (final FilterInfo filter : filters) {
             addFilter(filter);
         }
         return this;
     }
 
     public Map<StringFilterInfogetFilters() {
         return Collections.unmodifiableMap();
     }
 
     public DeploymentInfo addFilterUrlMapping(final String filterNamefinal String mappingDispatcherType dispatcher) {
         .add(new FilterMappingInfo(filterName..mappingdispatcher));
         return this;
     }
 
     public DeploymentInfo addFilterServletNameMapping(final String filterNamefinal String mappingDispatcherType dispatcher) {
         .add(new FilterMappingInfo(filterName..mappingdispatcher));
         return this;
     }
 
     public DeploymentInfo insertFilterUrlMapping(final int posfinal String filterNamefinal String mappingDispatcherType dispatcher) {
         .add(posnew FilterMappingInfo(filterName..mappingdispatcher));
         return this;
     }
 
     public DeploymentInfo insertFilterServletNameMapping(final int posfinal String filterNamefinal String mappingDispatcherType dispatcher) {
         .add(posnew FilterMappingInfo(filterName..mappingdispatcher));
         return this;
     }
 
         final ArrayList<FilterMappingInforet = new ArrayList<>();
         ret.addAll();
         return Collections.unmodifiableList(ret);
     }
 
 
     public DeploymentInfo addListener(final ListenerInfo listener) {
         .add(listener);
         return this;
     }
 
     public DeploymentInfo addListeners(final ListenerInfo... listeners) {
         this..addAll(Arrays.asList(listeners));
         return this;
     }
 
     public DeploymentInfo addListeners(final Collection<ListenerInfolisteners) {
         this..addAll(listeners);
         return this;
     }
 
     public List<ListenerInfogetListeners() {
         return ;
     }
 
     public int getMajorVersion() {
         return ;
     }
 
     public DeploymentInfo setMajorVersion(final int majorVersion) {
         this. = majorVersion;
         return this;
     }
 
     public int getMinorVersion() {
         return ;
     }
 
     public DeploymentInfo setMinorVersion(final int minorVersion) {
         this. = minorVersion;
         return this;
     }
 
     public DeploymentInfo addServletContainerInitalizer(final ServletContainerInitializerInfo servletContainerInitializer) {
         .add(servletContainerInitializer);
         return this;
     }
 
     public DeploymentInfo addServletContainerInitalizers(final ServletContainerInitializerInfo... servletContainerInitializer) {
         .addAll(Arrays.asList(servletContainerInitializer));
         return this;
     }
 
     public DeploymentInfo addServletContainerInitalizers(final List<ServletContainerInitializerInfoservletContainerInitializer) {
         .addAll(servletContainerInitializer);
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo addThreadSetupAction(final ThreadSetupAction action) {
         .add(action);
         return this;
     }
 
         return ;
     }
 
     public boolean isEagerFilterInit() {
         return ;
     }
 
     public DeploymentInfo setEagerFilterInit(boolean eagerFilterInit) {
         this. = eagerFilterInit;
         return this;
     }
 
     public DeploymentInfo addInitParameter(final String namefinal String value) {
         .put(namevalue);
         return this;
     }
 
     public Map<StringStringgetInitParameters() {
         return Collections.unmodifiableMap();
     }
 
     public DeploymentInfo addServletContextAttribute(final String namefinal Object value) {
         .put(namevalue);
         return this;
     }
 
     public Map<StringObjectgetServletContextAttributes() {
         return Collections.unmodifiableMap();
     }
 
     public DeploymentInfo addWelcomePage(final String welcomePage) {
         this..add(welcomePage);
         return this;
     }
 
     public DeploymentInfo addWelcomePages(final String... welcomePages) {
         this..addAll(Arrays.asList(welcomePages));
         return this;
     }
 
     public DeploymentInfo addWelcomePages(final Collection<StringwelcomePages) {
         this..addAll(welcomePages);
         return this;
     }
 
     public List<StringgetWelcomePages() {
         return Collections.unmodifiableList();
     }
 
     public DeploymentInfo addErrorPage(final ErrorPage errorPage) {
         this..add(errorPage);
         return this;
     }
 
     public DeploymentInfo addErrorPages(final ErrorPage... errorPages) {
         this..addAll(Arrays.asList(errorPages));
         return this;
     }
 
     public DeploymentInfo addErrorPages(final Collection<ErrorPageerrorPages) {
         this..addAll(errorPages);
         return this;
     }
 
     public List<ErrorPagegetErrorPages() {
         return Collections.unmodifiableList();
     }
 
     public DeploymentInfo addMimeMapping(final MimeMapping mimeMappings) {
         this..add(mimeMappings);
         return this;
     }
 
     public DeploymentInfo addMimeMappings(final MimeMapping... mimeMappings) {
         this..addAll(Arrays.asList(mimeMappings));
         return this;
     }
 
     public DeploymentInfo addMimeMappings(final Collection<MimeMappingmimeMappings) {
         this..addAll(mimeMappings);
         return this;
     }
 
     public List<MimeMappinggetMimeMappings() {
         return Collections.unmodifiableList();
     }
 
 
     public DeploymentInfo addSecurityConstraint(final SecurityConstraint securityConstraint) {
         this..add(securityConstraint);
         return this;
     }
 
     public DeploymentInfo addSecurityConstraints(final SecurityConstraint... securityConstraints) {
         this..addAll(Arrays.asList(securityConstraints));
         return this;
     }
 
     public DeploymentInfo addSecurityConstraints(final Collection<SecurityConstraintsecurityConstraints) {
         this..addAll(securityConstraints);
         return this;
     }
 
         return Collections.unmodifiableList();
     }
 
     public Executor getExecutor() {
         return ;
     }

    
Sets the executor that will be used to run servlet invocations. If this is null then the XNIO worker pool will be used.

Individual servlets may use a different executor

If this is null then the current executor is used, which is generally the XNIO worker pool

Parameters:
executor The executor
See also:
ServletInfo.executor
 
     public DeploymentInfo setExecutor(final Executor executor) {
         this. = executor;
         return this;
     }
 
     public Executor getAsyncExecutor() {
         return ;
     }

    
Sets the executor that is used to run async tasks.

If this is null then executor is used, if this is also null then the default is used

Parameters:
asyncExecutor The executor
 
     public DeploymentInfo setAsyncExecutor(final Executor asyncExecutor) {
         this. = asyncExecutor;
         return this;
     }
 
     public File getTempDir() {
         return ;
     }
 
     public DeploymentInfo setTempDir(final File tempDir) {
         this. = tempDir;
         return this;
     }
 
     public boolean isIgnoreFlush() {
         return ;
     }
 
     public DeploymentInfo setIgnoreFlush(boolean ignoreFlush) {
         this. = ignoreFlush;
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo setJspConfigDescriptor(JspConfigDescriptor jspConfigDescriptor) {
         this. = jspConfigDescriptor;
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo setDefaultServletConfig(final DefaultServletConfig defaultServletConfig) {
         this. = defaultServletConfig;
         return this;
     }
 
     public DeploymentInfo addLocaleCharsetMapping(final String localefinal String charset) {
         .put(localecharset);
         return this;
     }
 
     public Map<StringStringgetLocaleCharsetMapping() {
         return ;
     }
 
         return ;
     }
 
     public DeploymentInfo setSessionManagerFactory(final SessionManagerFactory sessionManagerFactory) {
         this. = sessionManagerFactory;
         return this;
     }
 
     public LoginConfig getLoginConfig() {
         return ;
     }
 
     public DeploymentInfo setLoginConfig(LoginConfig loginConfig) {
         this. = loginConfig;
         return this;
     }
 
     public IdentityManager getIdentityManager() {
         return ;
     }
 
     public DeploymentInfo setIdentityManager(IdentityManager identityManager) {
         this. = identityManager;
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo setConfidentialPortManager(ConfidentialPortManager confidentialPortManager) {
         this. = confidentialPortManager;
         return this;
     }
 
     public DeploymentInfo addSecurityRole(final String role) {
         this..add(role);
         return this;
     }
 
     public DeploymentInfo addSecurityRoles(final String... roles) {
         this..addAll(Arrays.asList(roles));
         return this;
     }
 
     public DeploymentInfo addSecurityRoles(final Collection<Stringroles) {
         this..addAll(roles);
         return this;
     }
 
     public Set<StringgetSecurityRoles() {
         return Collections.unmodifiableSet();
     }

    
Adds an outer handler wrapper. This handler will be run after the servlet initial handler, but before any other handlers. These are only run on REQUEST invocations, they are not invoked on a FORWARD or INCLUDE.

Parameters:
wrapper The wrapper
 
     public DeploymentInfo addOuterHandlerChainWrapper(final HandlerWrapper wrapper) {
         .add(wrapper);
         return this;
     }
 
         return Collections.unmodifiableList();
     }

    
Adds an inner handler chain wrapper. This handler will be run after the security handler, but before any other servlet handlers, and will be run for every request

Parameters:
wrapper The wrapper
 
     public DeploymentInfo addInnerHandlerChainWrapper(final HandlerWrapper wrapper) {
         .add(wrapper);
         return this;
     }
 
         return Collections.unmodifiableList();
     }
 
     public DeploymentInfo addInitialHandlerChainWrapper(final HandlerWrapper wrapper) {
         .add(wrapper);
         return this;
     }
 
         return Collections.unmodifiableList();
     }
 
     public DeploymentInfo addNotificationReceiver(final NotificationReceiver notificationReceiver) {
         this..add(notificationReceiver);
         return this;
     }
 
     public DeploymentInfo addNotificactionReceivers(final NotificationReceiver... notificationReceivers) {
         this..addAll(Arrays.asList(notificationReceivers));
         return this;
     }
 
     public DeploymentInfo addNotificationReceivers(final Collection<NotificationReceivernotificationReceivers) {
         this..addAll(notificationReceivers);
         return this;
     }
 
         return Collections.unmodifiableList();
     }
 
         return ;
     }

    
Sets the map that will be used by the ServletContext implementation to store attributes.

This should usuablly be null, in which case Undertow will create a new map. This is only used in situations where you want multiple deployments to share the same servlet context attributes.

Parameters:
servletContextAttributeBackingMap The backing map
 
     public DeploymentInfo setServletContextAttributeBackingMap(final ConcurrentMap<StringObjectservletContextAttributeBackingMap) {
         this. = servletContextAttributeBackingMap;
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo setServletSessionConfig(final ServletSessionConfig servletSessionConfig) {
         this. = servletSessionConfig;
         return this;
     }

    

Returns:
the host name
 
     public String getHostName() {
         return ;
     }
 
     public DeploymentInfo setHostName(final String hostName) {
         this. = hostName;
         return this;
     }
 
     public boolean isDenyUncoveredHttpMethods() {
         return ;
     }
 
     public DeploymentInfo setDenyUncoveredHttpMethods(final boolean denyUncoveredHttpMethods) {
         this. = denyUncoveredHttpMethods;
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo setServletStackTraces(ServletStackTraces servletStackTraces) {
         this. = servletStackTraces;
         return this;
     }
 
     public boolean isInvalidateSessionOnLogout() {
         return ;
     }
 
     public DeploymentInfo setInvalidateSessionOnLogout(boolean invalidateSessionOnLogout) {
         this. = invalidateSessionOnLogout;
         return this;
     }
 
     public int getDefaultCookieVersion() {
         return ;
     }
 
     public DeploymentInfo setDefaultCookieVersion(int defaultCookieVersion) {
         this. = defaultCookieVersion;
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo setSessionPersistenceManager(SessionPersistenceManager sessionPersistenceManager) {
         this. = sessionPersistenceManager;
         return this;
     }
 
         return ;
     }
 
     public DeploymentInfo setAuthorizationManager(AuthorizationManager authorizationManager) {
         this. = authorizationManager;
         return this;
     }
 
     public DeploymentInfo addPrincipalVsRoleMapping(final String principalfinal String mapping) {
         Set<Stringset = .get(principal);
         if (set == null) {
             .put(principalset = new HashSet<>());
         }
         set.add(mapping);
         return this;
     }
 
     public DeploymentInfo addPrincipalVsRoleMappings(final String principalfinal String... mappings) {
         Set<Stringset = .get(principal);
         if (set == null) {
             .put(principalset = new HashSet<>());
         }
         set.addAll(Arrays.asList(mappings));
         return this;
     }
 
     public DeploymentInfo addPrincipalVsRoleMappings(final String principalfinal Collection<Stringmappings) {
         Set<Stringset = .get(principal);
         if (set == null) {
             .put(principalset = new HashSet<>());
         }
         set.addAll(mappings);
         return this;
     }
 
     public Map<StringSet<String>> getPrincipalVersusRolesMap() {
         return Collections.unmodifiableMap();
     }

    
Removes all configured authentication mechanisms from the deployment.

Returns:
this deployment info
 
     public DeploymentInfo clearLoginMethods() {
         if( != null) {
             .getAuthMethods().clear();
         }
         return this;
     }

    
Adds an authentication mechanism directly to the deployment. This mechanism will be first in the list. In general you should just use addAuthenticationMechanism(java.lang.String,io.undertow.security.api.AuthenticationMechanismFactory) and allow the user to configure the methods they want by name. This method is essentially a convenience method, if is the same as registering a factory under the provided name that returns and authentication mechanism, and then adding it to the login config list. If you want your mechanism to be the only one in the deployment you should first invoke clearLoginMethods().

Parameters:
name The authentication mechanism name
mechanism The mechanism
Returns:
this deployment info
 
     public DeploymentInfo addFirstAuthenticationMechanism(final String namefinal AuthenticationMechanism mechanism) {
         if( == null) {
              = new LoginConfig(null);
         }
         .addFirstAuthMethod(new AuthMethodConfig(name));
         return this;
     }

    
Adds an authentication mechanism directly to the deployment. This mechanism will be last in the list. In general you should just use addAuthenticationMechanism(java.lang.String,io.undertow.security.api.AuthenticationMechanismFactory) and allow the user to configure the methods they want by name. This method is essentially a convenience method, if is the same as registering a factory under the provided name that returns and authentication mechanism, and then adding it to the login config list. If you want your mechanism to be the only one in the deployment you should first invoke clearLoginMethods().

Parameters:
name The authentication mechanism name
mechanism The mechanism
Returns:
 
     public DeploymentInfo addLastAuthenticationMechanism(final String namefinal AuthenticationMechanism mechanism) {
         if( == null) {
              = new LoginConfig(null);
         }
         .addLastAuthMethod(new AuthMethodConfig(name));
         return this;
     }

    
Adds an authentication mechanism. The name is case insenstive, and will be converted to uppercase internally.

Parameters:
name The name
factory The factory
Returns:
 
     public DeploymentInfo addAuthenticationMechanism(final String namefinal AuthenticationMechanismFactory factory) {
         .put(name.toUpperCase(.), factory);
         return this;
     }
 
         return Collections.unmodifiableMap();
     }

    
Returns true if the specified mechanism is present in the login config

Parameters:
mechanismName The mechanism name
Returns:
true if the mechanism is enabled
 
     public boolean isAuthenticationMechanismPresent(final String mechanismName) {
         if( != null) {
             for(AuthMethodConfig method : .getAuthMethods()) {
                 if(method.getName().equalsIgnoreCase(mechanismName)) {
                     return true;
                 }
             }
         }
         return false;
     }

    
Adds an additional servlet extension to the deployment. Servlet extensions are generally discovered using META-INF/services entries, however this may not be practical in all environments.

Parameters:
servletExtension The servlet extension
Returns:
this
 
     public DeploymentInfo addServletExtension(final ServletExtension servletExtension) {
         this..add(servletExtension);
         return this;
     }
 
         return ;
     }
 
         return ;
     }
 
     public void setJaspiAuthenticationMechanism(AuthenticationMechanism jaspiAuthenticationMechanism) {
         this. = jaspiAuthenticationMechanism;
     }
 
         return this.;
     }
 
     public void setSecurityContextFactory(final SecurityContextFactory securityContextFactory) {
         this. = securityContextFactory;
     }
 
     public String getServerName() {
         return ;
     }
 
     public DeploymentInfo setServerName(String serverName) {
         this. = serverName;
         return this;
     }
 
     public DeploymentInfo setMetricsCollector(MetricsCollector metricsCollector){
         this. = metricsCollector;
         return this;
     }
 
         return ;
     }
 
         return ;
     }
 
     public DeploymentInfo setSessionConfigWrapper(SessionConfigWrapper sessionConfigWrapper) {
        this. = sessionConfigWrapper;
        return this;
    }
    public boolean isDisableCachingForSecuredPages() {
        return ;
    }
    public void setDisableCachingForSecuredPages(boolean disableCachingForSecuredPages) {
        this. = disableCachingForSecuredPages;
    }
    public DeploymentInfo addLifecycleInterceptor(final LifecycleInterceptor interceptor) {
        .add(interceptor);
        return this;
    }
        return Collections.unmodifiableList();
    }

    
Returns the exception handler that is used by this deployment. By default this will simply log unhandled exceptions
        return ;
    }

    
Sets the default exception handler for this deployment

Parameters:
exceptionHandler The exception handler
Returns:
    public DeploymentInfo setExceptionHandler(ExceptionHandler exceptionHandler) {
        this. = exceptionHandler;
        return this;
    }
    public boolean isEscapeErrorMessage() {
        return ;
    }

    
Set if if the message passed to javax.servlet.http.HttpServletResponse.sendError(int,java.lang.String) should be escaped. If this is false applications must be careful not to use user provided data (such as the URI) in the message

Parameters:
escapeErrorMessage If the error message should be escaped
    public void setEscapeErrorMessage(boolean escapeErrorMessage) {
        this. = escapeErrorMessage;
    }
    public DeploymentInfo addSessionListener(SessionListener sessionListener) {
        this..add(sessionListener);
        return this;
    }
        return Collections.unmodifiableList();
    }
    @Override
    public DeploymentInfo clone() {
        final DeploymentInfo info = new DeploymentInfo()
                .setClassLoader()
                .setContextPath()
                .setResourceManager()
                .setMajorVersion()
                .setMinorVersion()
                .setDeploymentName()
                .setClassIntrospecter();
        for (Map.Entry<StringServletInfoe : .entrySet()) {
            info.addServlet(e.getValue().clone());
        }
        for (Map.Entry<StringFilterInfoe : .entrySet()) {
            info.addFilter(e.getValue().clone());
        }
        info.displayName = ;
        info.filterUrlMappings.addAll();
        info.filterServletNameMappings.addAll();
        info.listeners.addAll();
        info.servletContainerInitializers.addAll();
        info.threadSetupActions.addAll();
        info.initParameters.putAll();
        info.servletContextAttributes.putAll();
        info.welcomePages.addAll();
        info.errorPages.addAll();
        info.mimeMappings.addAll();
        info.executor = ;
        info.asyncExecutor = ;
        info.tempDir = ;
        info.jspConfigDescriptor = ;
        info.defaultServletConfig = ;
        info.localeCharsetMapping.putAll();
        info.sessionManagerFactory = ;
        if ( != null) {
            info.loginConfig = .clone();
        }
        info.identityManager = ;
        info.confidentialPortManager = ;
        info.defaultEncoding = ;
        info.urlEncoding = ;
        info.securityConstraints.addAll();
        info.outerHandlerChainWrappers.addAll();
        info.innerHandlerChainWrappers.addAll();
        info.initialHandlerChainWrappers.addAll();
        info.securityRoles.addAll();
        info.notificationReceivers.addAll();
        info.allowNonStandardWrappers = ;
        info.defaultSessionTimeout = ;
        info.servletContextAttributeBackingMap = ;
        info.servletSessionConfig = ;
        info.hostName = ;
        info.denyUncoveredHttpMethods = ;
        info.servletStackTraces = ;
        info.invalidateSessionOnLogout = ;
        info.defaultCookieVersion = ;
        info.sessionPersistenceManager = ;
        info.principalVersusRolesMap.putAll();
        info.ignoreFlush = ;
        info.authorizationManager = ;
        info.authenticationMechanisms.putAll();
        info.servletExtensions.addAll();
        info.jaspiAuthenticationMechanism = ;
        info.securityContextFactory = ;
        info.serverName = ;
        info.metricsCollector =