All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.swarm.config.undertow.ServletContainer Maven / Gradle / Ivy

There is a newer version: 2.7.0
Show newest version
package org.wildfly.swarm.config.undertow;

import org.wildfly.swarm.config.runtime.AttributeDocumentation;
import org.wildfly.swarm.config.runtime.ResourceDocumentation;
import org.wildfly.swarm.config.runtime.SingletonResource;
import org.wildfly.swarm.config.runtime.Address;
import org.wildfly.swarm.config.runtime.ResourceType;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import java.util.List;
import org.wildfly.swarm.config.runtime.Subresource;
import org.wildfly.swarm.config.undertow.servlet_container.MimeMappingConsumer;
import org.wildfly.swarm.config.undertow.servlet_container.MimeMappingSupplier;
import org.wildfly.swarm.config.undertow.servlet_container.MimeMapping;
import org.wildfly.swarm.config.runtime.SubresourceInfo;
import org.wildfly.swarm.config.undertow.servlet_container.WelcomeFileConsumer;
import org.wildfly.swarm.config.undertow.servlet_container.WelcomeFileSupplier;
import org.wildfly.swarm.config.undertow.servlet_container.WelcomeFile;
import org.wildfly.swarm.config.undertow.servlet_container.PersistentSessionsSetting;
import org.wildfly.swarm.config.undertow.servlet_container.PersistentSessionsSettingConsumer;
import org.wildfly.swarm.config.undertow.servlet_container.PersistentSessionsSettingSupplier;
import org.wildfly.swarm.config.undertow.servlet_container.CrawlerSessionManagementSetting;
import org.wildfly.swarm.config.undertow.servlet_container.CrawlerSessionManagementSettingConsumer;
import org.wildfly.swarm.config.undertow.servlet_container.CrawlerSessionManagementSettingSupplier;
import org.wildfly.swarm.config.undertow.servlet_container.JSPSetting;
import org.wildfly.swarm.config.undertow.servlet_container.JSPSettingConsumer;
import org.wildfly.swarm.config.undertow.servlet_container.JSPSettingSupplier;
import org.wildfly.swarm.config.undertow.servlet_container.WebsocketsSetting;
import org.wildfly.swarm.config.undertow.servlet_container.WebsocketsSettingConsumer;
import org.wildfly.swarm.config.undertow.servlet_container.WebsocketsSettingSupplier;
import org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSetting;
import org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingConsumer;
import org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingSupplier;
import org.wildfly.swarm.config.runtime.ModelNodeBinding;
import java.util.Arrays;

/**
 * A servlet container
 */
@Address("/subsystem=undertow/servlet-container=*")
@ResourceType("servlet-container")
public class ServletContainer>
		implements
			org.wildfly.swarm.config.runtime.Keyed {

	private String key;
	private PropertyChangeSupport pcs;
	private ServletContainerResources subresources = new ServletContainerResources();
	@AttributeDocumentation("If true then request and response wrappers that do not extend the standard wrapper classes can be used")
	private Boolean allowNonStandardWrappers;
	@AttributeDocumentation("The buffer cache to use for caching static resources")
	private String defaultBufferCache;
	@AttributeDocumentation("The default cookie version servlet applications will send")
	private Integer defaultCookieVersion;
	@AttributeDocumentation("Default encoding to use for all deployed applications")
	private String defaultEncoding;
	@AttributeDocumentation("The default session timeout (in minutes) for all applications deployed in the container.")
	private Integer defaultSessionTimeout;
	@AttributeDocumentation("If directory listing should be enabled for default servlets.")
	private Boolean directoryListing;
	@AttributeDocumentation("If Undertow should set headers to disable caching for secured paged. Disabling this can cause security problems, as sensitive pages may be cached by an intermediary.")
	private Boolean disableCachingForSecuredPages;
	@AttributeDocumentation("If this is true then the file watch service will not be used to monitor exploded deployments for changes")
	private Boolean disableFileWatchService;
	@AttributeDocumentation("If this is true then an unknown session ID will never be reused, and a new session id will be generated. If this is false then it will be re-used if and only if it is present in the session manager of another deployment, to allow the same session id to be shared between applications on the same server.")
	private Boolean disableSessionIdReuse;
	@AttributeDocumentation("If true undertow calls filter init() on deployment start rather than when first requested.")
	private Boolean eagerFilterInitialization;
	@AttributeDocumentation("The maximum size of a file that will be cached in the file cache")
	private Integer fileCacheMaxFileSize;
	@AttributeDocumentation("The maximum number of files that will have their metadata cached")
	private Integer fileCacheMetadataSize;
	@AttributeDocumentation("The length of time in ms an item will stay cached. By default this is 2000 for exploded deployments, and -1 (infinite) for archive deployments")
	private Integer fileCacheTimeToLive;
	@AttributeDocumentation("Ignore flushes on the servlet output stream. In most cases these just hurt performance for no good reason.")
	private Boolean ignoreFlush;
	@AttributeDocumentation("The maximum number of sessions that can be active at one time")
	private Integer maxSessions;
	@AttributeDocumentation("If proactive authentication should be used. If this is true a user will always be authenticated if credentials are present.")
	private Boolean proactiveAuthentication;
	@AttributeDocumentation("The length of the generated session ID. Longer session ID's are more secure. This number refers to the number of bytes of randomness that are used to generate the session ID, the actual ID that is sent to the client will be base64 encoded so will be approximately 33% larger (e.g. a session id length of 30 will result in a cookie value of length 40).")
	private Integer sessionIdLength;
	@AttributeDocumentation("If an error page with the stack trace should be generated on error. Values are all, none and local-only")
	private StackTraceOnError stackTraceOnError;
	@AttributeDocumentation("Use encoding defined on listener")
	private Boolean useListenerEncoding;

	public ServletContainer(java.lang.String key) {
		super();
		this.key = key;
	}

	public String getKey() {
		return this.key;
	}

	/**
	 * Adds a property change listener
	 */
	public void addPropertyChangeListener(PropertyChangeListener listener) {
		if (null == this.pcs)
			this.pcs = new PropertyChangeSupport(this);
		this.pcs.addPropertyChangeListener(listener);
	}

	/**
	 * Removes a property change listener
	 */
	public void removePropertyChangeListener(
			java.beans.PropertyChangeListener listener) {
		if (this.pcs != null)
			this.pcs.removePropertyChangeListener(listener);
	}

	public ServletContainerResources subresources() {
		return this.subresources;
	}

	/**
	 * Add all MimeMapping objects to this subresource
	 * 
	 * @return this
	 * @param value
	 *            List of MimeMapping objects.
	 */
	@SuppressWarnings("unchecked")
	public T mimeMappings(java.util.List value) {
		this.subresources.mimeMappings = value;
		return (T) this;
	}

	/**
	 * Add the MimeMapping object to the list of subresources
	 * 
	 * @param value
	 *            The MimeMapping to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T mimeMapping(MimeMapping value) {
		this.subresources.mimeMappings.add(value);
		return (T) this;
	}

	/**
	 * Create and configure a MimeMapping object to the list of subresources
	 * 
	 * @param key
	 *            The key for the MimeMapping resource
	 * @param config
	 *            The MimeMappingConsumer to use
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T mimeMapping(java.lang.String childKey, MimeMappingConsumer consumer) {
		MimeMapping child = new MimeMapping<>(childKey);
		if (consumer != null) {
			consumer.accept(child);
		}
		mimeMapping(child);
		return (T) this;
	}

	/**
	 * Create and configure a MimeMapping object to the list of subresources
	 * 
	 * @param key
	 *            The key for the MimeMapping resource
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T mimeMapping(java.lang.String childKey) {
		mimeMapping(childKey, null);
		return (T) this;
	}

	/**
	 * Install a supplied MimeMapping object to the list of subresources
	 */
	@SuppressWarnings("unchecked")
	public T mimeMapping(MimeMappingSupplier supplier) {
		mimeMapping(supplier.get());
		return (T) this;
	}

	/**
	 * Add all WelcomeFile objects to this subresource
	 * 
	 * @return this
	 * @param value
	 *            List of WelcomeFile objects.
	 */
	@SuppressWarnings("unchecked")
	public T welcomeFiles(java.util.List value) {
		this.subresources.welcomeFiles = value;
		return (T) this;
	}

	/**
	 * Add the WelcomeFile object to the list of subresources
	 * 
	 * @param value
	 *            The WelcomeFile to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T welcomeFile(WelcomeFile value) {
		this.subresources.welcomeFiles.add(value);
		return (T) this;
	}

	/**
	 * Create and configure a WelcomeFile object to the list of subresources
	 * 
	 * @param key
	 *            The key for the WelcomeFile resource
	 * @param config
	 *            The WelcomeFileConsumer to use
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T welcomeFile(java.lang.String childKey, WelcomeFileConsumer consumer) {
		WelcomeFile child = new WelcomeFile<>(childKey);
		if (consumer != null) {
			consumer.accept(child);
		}
		welcomeFile(child);
		return (T) this;
	}

	/**
	 * Create and configure a WelcomeFile object to the list of subresources
	 * 
	 * @param key
	 *            The key for the WelcomeFile resource
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T welcomeFile(java.lang.String childKey) {
		welcomeFile(childKey, null);
		return (T) this;
	}

	/**
	 * Install a supplied WelcomeFile object to the list of subresources
	 */
	@SuppressWarnings("unchecked")
	public T welcomeFile(WelcomeFileSupplier supplier) {
		welcomeFile(supplier.get());
		return (T) this;
	}

	/**
	 * Session persistence sessions
	 */
	@SuppressWarnings("unchecked")
	public T persistentSessionsSetting(PersistentSessionsSetting value) {
		this.subresources.persistentSessionsSetting = value;
		return (T) this;
	}

	/**
	 * Session persistence sessions
	 */
	@SuppressWarnings("unchecked")
	public T persistentSessionsSetting(
			PersistentSessionsSettingConsumer consumer) {
		PersistentSessionsSetting child = new PersistentSessionsSetting<>();
		if (consumer != null) {
			consumer.accept(child);
		}
		this.subresources.persistentSessionsSetting = child;
		return (T) this;
	}

	/**
	 * Session persistence sessions
	 */
	@SuppressWarnings("unchecked")
	public T persistentSessionsSetting() {
		PersistentSessionsSetting child = new PersistentSessionsSetting<>();
		this.subresources.persistentSessionsSetting = child;
		return (T) this;
	}

	/**
	 * Session persistence sessions
	 */
	@SuppressWarnings("unchecked")
	public T persistentSessionsSetting(
			PersistentSessionsSettingSupplier supplier) {
		this.subresources.persistentSessionsSetting = supplier.get();
		return (T) this;
	}

	/**
	 * Configures special session handling for crawler bots
	 */
	@SuppressWarnings("unchecked")
	public T crawlerSessionManagementSetting(
			CrawlerSessionManagementSetting value) {
		this.subresources.crawlerSessionManagementSetting = value;
		return (T) this;
	}

	/**
	 * Configures special session handling for crawler bots
	 */
	@SuppressWarnings("unchecked")
	public T crawlerSessionManagementSetting(
			CrawlerSessionManagementSettingConsumer consumer) {
		CrawlerSessionManagementSetting child = new CrawlerSessionManagementSetting<>();
		if (consumer != null) {
			consumer.accept(child);
		}
		this.subresources.crawlerSessionManagementSetting = child;
		return (T) this;
	}

	/**
	 * Configures special session handling for crawler bots
	 */
	@SuppressWarnings("unchecked")
	public T crawlerSessionManagementSetting() {
		CrawlerSessionManagementSetting child = new CrawlerSessionManagementSetting<>();
		this.subresources.crawlerSessionManagementSetting = child;
		return (T) this;
	}

	/**
	 * Configures special session handling for crawler bots
	 */
	@SuppressWarnings("unchecked")
	public T crawlerSessionManagementSetting(
			CrawlerSessionManagementSettingSupplier supplier) {
		this.subresources.crawlerSessionManagementSetting = supplier.get();
		return (T) this;
	}

	/**
	 * JSP container configuration.
	 */
	@SuppressWarnings("unchecked")
	public T jspSetting(JSPSetting value) {
		this.subresources.jspSetting = value;
		return (T) this;
	}

	/**
	 * JSP container configuration.
	 */
	@SuppressWarnings("unchecked")
	public T jspSetting(JSPSettingConsumer consumer) {
		JSPSetting child = new JSPSetting<>();
		if (consumer != null) {
			consumer.accept(child);
		}
		this.subresources.jspSetting = child;
		return (T) this;
	}

	/**
	 * JSP container configuration.
	 */
	@SuppressWarnings("unchecked")
	public T jspSetting() {
		JSPSetting child = new JSPSetting<>();
		this.subresources.jspSetting = child;
		return (T) this;
	}

	/**
	 * JSP container configuration.
	 */
	@SuppressWarnings("unchecked")
	public T jspSetting(JSPSettingSupplier supplier) {
		this.subresources.jspSetting = supplier.get();
		return (T) this;
	}

	/**
	 * If websockets are enabled for this container
	 */
	@SuppressWarnings("unchecked")
	public T websocketsSetting(WebsocketsSetting value) {
		this.subresources.websocketsSetting = value;
		return (T) this;
	}

	/**
	 * If websockets are enabled for this container
	 */
	@SuppressWarnings("unchecked")
	public T websocketsSetting(WebsocketsSettingConsumer consumer) {
		WebsocketsSetting child = new WebsocketsSetting<>();
		if (consumer != null) {
			consumer.accept(child);
		}
		this.subresources.websocketsSetting = child;
		return (T) this;
	}

	/**
	 * If websockets are enabled for this container
	 */
	@SuppressWarnings("unchecked")
	public T websocketsSetting() {
		WebsocketsSetting child = new WebsocketsSetting<>();
		this.subresources.websocketsSetting = child;
		return (T) this;
	}

	/**
	 * If websockets are enabled for this container
	 */
	@SuppressWarnings("unchecked")
	public T websocketsSetting(WebsocketsSettingSupplier supplier) {
		this.subresources.websocketsSetting = supplier.get();
		return (T) this;
	}

	/**
	 * Session cookie configuration
	 */
	@SuppressWarnings("unchecked")
	public T sessionCookieSetting(SessionCookieSetting value) {
		this.subresources.sessionCookieSetting = value;
		return (T) this;
	}

	/**
	 * Session cookie configuration
	 */
	@SuppressWarnings("unchecked")
	public T sessionCookieSetting(SessionCookieSettingConsumer consumer) {
		SessionCookieSetting child = new SessionCookieSetting<>();
		if (consumer != null) {
			consumer.accept(child);
		}
		this.subresources.sessionCookieSetting = child;
		return (T) this;
	}

	/**
	 * Session cookie configuration
	 */
	@SuppressWarnings("unchecked")
	public T sessionCookieSetting() {
		SessionCookieSetting child = new SessionCookieSetting<>();
		this.subresources.sessionCookieSetting = child;
		return (T) this;
	}

	/**
	 * Session cookie configuration
	 */
	@SuppressWarnings("unchecked")
	public T sessionCookieSetting(SessionCookieSettingSupplier supplier) {
		this.subresources.sessionCookieSetting = supplier.get();
		return (T) this;
	}

	/**
	 * Child mutators for ServletContainer
	 */
	public static class ServletContainerResources {
		/**
		 * The servlet container mime mapping config
		 */
		@ResourceDocumentation("The servlet container mime mapping config")
		@SubresourceInfo("mimeMapping")
		private List mimeMappings = new java.util.ArrayList<>();
		/**
		 * The welcome file
		 */
		@ResourceDocumentation("The welcome file")
		@SubresourceInfo("welcomeFile")
		private List welcomeFiles = new java.util.ArrayList<>();
		@SingletonResource
		@ResourceDocumentation("Session persistence sessions")
		private PersistentSessionsSetting persistentSessionsSetting;
		@SingletonResource
		@ResourceDocumentation("Configures special session handling for crawler bots")
		private CrawlerSessionManagementSetting crawlerSessionManagementSetting;
		@SingletonResource
		@ResourceDocumentation("JSP container configuration.")
		private JSPSetting jspSetting;
		@SingletonResource
		@ResourceDocumentation("If websockets are enabled for this container")
		private WebsocketsSetting websocketsSetting;
		@SingletonResource
		@ResourceDocumentation("Session cookie configuration")
		private SessionCookieSetting sessionCookieSetting;

		/**
		 * Get the list of MimeMapping resources
		 * 
		 * @return the list of resources
		 */
		@Subresource
		public List mimeMappings() {
			return this.mimeMappings;
		}

		public MimeMapping mimeMapping(java.lang.String key) {
			return this.mimeMappings.stream()
					.filter(e -> e.getKey().equals(key)).findFirst()
					.orElse(null);
		}
		/**
		 * Get the list of WelcomeFile resources
		 * 
		 * @return the list of resources
		 */
		@Subresource
		public List welcomeFiles() {
			return this.welcomeFiles;
		}

		public WelcomeFile welcomeFile(java.lang.String key) {
			return this.welcomeFiles.stream()
					.filter(e -> e.getKey().equals(key)).findFirst()
					.orElse(null);
		}
		/**
		 * Session persistence sessions
		 */
		@Subresource
		public PersistentSessionsSetting persistentSessionsSetting() {
			return this.persistentSessionsSetting;
		}

		/**
		 * Configures special session handling for crawler bots
		 */
		@Subresource
		public CrawlerSessionManagementSetting crawlerSessionManagementSetting() {
			return this.crawlerSessionManagementSetting;
		}

		/**
		 * JSP container configuration.
		 */
		@Subresource
		public JSPSetting jspSetting() {
			return this.jspSetting;
		}

		/**
		 * If websockets are enabled for this container
		 */
		@Subresource
		public WebsocketsSetting websocketsSetting() {
			return this.websocketsSetting;
		}

		/**
		 * Session cookie configuration
		 */
		@Subresource
		public SessionCookieSetting sessionCookieSetting() {
			return this.sessionCookieSetting;
		}
	}

	public static enum StackTraceOnError {
		NONE("none"), LOCAL_ONLY("local-only"), ALL("all");
		private final String allowedValue;

		/**
		 * Returns the allowed value for the management model.
		 * 
		 * @return the allowed model value
		 */
		public String getAllowedValue() {
			return allowedValue;
		}

		StackTraceOnError(java.lang.String allowedValue) {
			this.allowedValue = allowedValue;
		}

		@Override
		public String toString() {
			return allowedValue;
		}
	}

	/**
	 * If true then request and response wrappers that do not extend the
	 * standard wrapper classes can be used
	 */
	@ModelNodeBinding(detypedName = "allow-non-standard-wrappers")
	public Boolean allowNonStandardWrappers() {
		return this.allowNonStandardWrappers;
	}

	/**
	 * If true then request and response wrappers that do not extend the
	 * standard wrapper classes can be used
	 */
	@SuppressWarnings("unchecked")
	public T allowNonStandardWrappers(java.lang.Boolean value) {
		Object oldValue = this.allowNonStandardWrappers;
		this.allowNonStandardWrappers = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("allowNonStandardWrappers", oldValue,
					value);
		return (T) this;
	}

	/**
	 * The buffer cache to use for caching static resources
	 */
	@ModelNodeBinding(detypedName = "default-buffer-cache")
	public String defaultBufferCache() {
		return this.defaultBufferCache;
	}

	/**
	 * The buffer cache to use for caching static resources
	 */
	@SuppressWarnings("unchecked")
	public T defaultBufferCache(java.lang.String value) {
		Object oldValue = this.defaultBufferCache;
		this.defaultBufferCache = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("defaultBufferCache", oldValue, value);
		return (T) this;
	}

	/**
	 * The default cookie version servlet applications will send
	 */
	@ModelNodeBinding(detypedName = "default-cookie-version")
	public Integer defaultCookieVersion() {
		return this.defaultCookieVersion;
	}

	/**
	 * The default cookie version servlet applications will send
	 */
	@SuppressWarnings("unchecked")
	public T defaultCookieVersion(java.lang.Integer value) {
		Object oldValue = this.defaultCookieVersion;
		this.defaultCookieVersion = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("defaultCookieVersion", oldValue, value);
		return (T) this;
	}

	/**
	 * Default encoding to use for all deployed applications
	 */
	@ModelNodeBinding(detypedName = "default-encoding")
	public String defaultEncoding() {
		return this.defaultEncoding;
	}

	/**
	 * Default encoding to use for all deployed applications
	 */
	@SuppressWarnings("unchecked")
	public T defaultEncoding(java.lang.String value) {
		Object oldValue = this.defaultEncoding;
		this.defaultEncoding = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("defaultEncoding", oldValue, value);
		return (T) this;
	}

	/**
	 * The default session timeout (in minutes) for all applications deployed in
	 * the container.
	 */
	@ModelNodeBinding(detypedName = "default-session-timeout")
	public Integer defaultSessionTimeout() {
		return this.defaultSessionTimeout;
	}

	/**
	 * The default session timeout (in minutes) for all applications deployed in
	 * the container.
	 */
	@SuppressWarnings("unchecked")
	public T defaultSessionTimeout(java.lang.Integer value) {
		Object oldValue = this.defaultSessionTimeout;
		this.defaultSessionTimeout = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("defaultSessionTimeout", oldValue,
					value);
		return (T) this;
	}

	/**
	 * If directory listing should be enabled for default servlets.
	 */
	@ModelNodeBinding(detypedName = "directory-listing")
	public Boolean directoryListing() {
		return this.directoryListing;
	}

	/**
	 * If directory listing should be enabled for default servlets.
	 */
	@SuppressWarnings("unchecked")
	public T directoryListing(java.lang.Boolean value) {
		Object oldValue = this.directoryListing;
		this.directoryListing = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("directoryListing", oldValue, value);
		return (T) this;
	}

	/**
	 * If Undertow should set headers to disable caching for secured paged.
	 * Disabling this can cause security problems, as sensitive pages may be
	 * cached by an intermediary.
	 */
	@ModelNodeBinding(detypedName = "disable-caching-for-secured-pages")
	public Boolean disableCachingForSecuredPages() {
		return this.disableCachingForSecuredPages;
	}

	/**
	 * If Undertow should set headers to disable caching for secured paged.
	 * Disabling this can cause security problems, as sensitive pages may be
	 * cached by an intermediary.
	 */
	@SuppressWarnings("unchecked")
	public T disableCachingForSecuredPages(java.lang.Boolean value) {
		Object oldValue = this.disableCachingForSecuredPages;
		this.disableCachingForSecuredPages = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("disableCachingForSecuredPages",
					oldValue, value);
		return (T) this;
	}

	/**
	 * If this is true then the file watch service will not be used to monitor
	 * exploded deployments for changes
	 */
	@ModelNodeBinding(detypedName = "disable-file-watch-service")
	public Boolean disableFileWatchService() {
		return this.disableFileWatchService;
	}

	/**
	 * If this is true then the file watch service will not be used to monitor
	 * exploded deployments for changes
	 */
	@SuppressWarnings("unchecked")
	public T disableFileWatchService(java.lang.Boolean value) {
		Object oldValue = this.disableFileWatchService;
		this.disableFileWatchService = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("disableFileWatchService", oldValue,
					value);
		return (T) this;
	}

	/**
	 * If this is true then an unknown session ID will never be reused, and a
	 * new session id will be generated. If this is false then it will be
	 * re-used if and only if it is present in the session manager of another
	 * deployment, to allow the same session id to be shared between
	 * applications on the same server.
	 */
	@ModelNodeBinding(detypedName = "disable-session-id-reuse")
	public Boolean disableSessionIdReuse() {
		return this.disableSessionIdReuse;
	}

	/**
	 * If this is true then an unknown session ID will never be reused, and a
	 * new session id will be generated. If this is false then it will be
	 * re-used if and only if it is present in the session manager of another
	 * deployment, to allow the same session id to be shared between
	 * applications on the same server.
	 */
	@SuppressWarnings("unchecked")
	public T disableSessionIdReuse(java.lang.Boolean value) {
		Object oldValue = this.disableSessionIdReuse;
		this.disableSessionIdReuse = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("disableSessionIdReuse", oldValue,
					value);
		return (T) this;
	}

	/**
	 * If true undertow calls filter init() on deployment start rather than when
	 * first requested.
	 */
	@ModelNodeBinding(detypedName = "eager-filter-initialization")
	public Boolean eagerFilterInitialization() {
		return this.eagerFilterInitialization;
	}

	/**
	 * If true undertow calls filter init() on deployment start rather than when
	 * first requested.
	 */
	@SuppressWarnings("unchecked")
	public T eagerFilterInitialization(java.lang.Boolean value) {
		Object oldValue = this.eagerFilterInitialization;
		this.eagerFilterInitialization = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("eagerFilterInitialization", oldValue,
					value);
		return (T) this;
	}

	/**
	 * The maximum size of a file that will be cached in the file cache
	 */
	@ModelNodeBinding(detypedName = "file-cache-max-file-size")
	public Integer fileCacheMaxFileSize() {
		return this.fileCacheMaxFileSize;
	}

	/**
	 * The maximum size of a file that will be cached in the file cache
	 */
	@SuppressWarnings("unchecked")
	public T fileCacheMaxFileSize(java.lang.Integer value) {
		Object oldValue = this.fileCacheMaxFileSize;
		this.fileCacheMaxFileSize = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("fileCacheMaxFileSize", oldValue, value);
		return (T) this;
	}

	/**
	 * The maximum number of files that will have their metadata cached
	 */
	@ModelNodeBinding(detypedName = "file-cache-metadata-size")
	public Integer fileCacheMetadataSize() {
		return this.fileCacheMetadataSize;
	}

	/**
	 * The maximum number of files that will have their metadata cached
	 */
	@SuppressWarnings("unchecked")
	public T fileCacheMetadataSize(java.lang.Integer value) {
		Object oldValue = this.fileCacheMetadataSize;
		this.fileCacheMetadataSize = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("fileCacheMetadataSize", oldValue,
					value);
		return (T) this;
	}

	/**
	 * The length of time in ms an item will stay cached. By default this is
	 * 2000 for exploded deployments, and -1 (infinite) for archive deployments
	 */
	@ModelNodeBinding(detypedName = "file-cache-time-to-live")
	public Integer fileCacheTimeToLive() {
		return this.fileCacheTimeToLive;
	}

	/**
	 * The length of time in ms an item will stay cached. By default this is
	 * 2000 for exploded deployments, and -1 (infinite) for archive deployments
	 */
	@SuppressWarnings("unchecked")
	public T fileCacheTimeToLive(java.lang.Integer value) {
		Object oldValue = this.fileCacheTimeToLive;
		this.fileCacheTimeToLive = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("fileCacheTimeToLive", oldValue, value);
		return (T) this;
	}

	/**
	 * Ignore flushes on the servlet output stream. In most cases these just
	 * hurt performance for no good reason.
	 */
	@ModelNodeBinding(detypedName = "ignore-flush")
	public Boolean ignoreFlush() {
		return this.ignoreFlush;
	}

	/**
	 * Ignore flushes on the servlet output stream. In most cases these just
	 * hurt performance for no good reason.
	 */
	@SuppressWarnings("unchecked")
	public T ignoreFlush(java.lang.Boolean value) {
		Object oldValue = this.ignoreFlush;
		this.ignoreFlush = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("ignoreFlush", oldValue, value);
		return (T) this;
	}

	/**
	 * The maximum number of sessions that can be active at one time
	 */
	@ModelNodeBinding(detypedName = "max-sessions")
	public Integer maxSessions() {
		return this.maxSessions;
	}

	/**
	 * The maximum number of sessions that can be active at one time
	 */
	@SuppressWarnings("unchecked")
	public T maxSessions(java.lang.Integer value) {
		Object oldValue = this.maxSessions;
		this.maxSessions = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("maxSessions", oldValue, value);
		return (T) this;
	}

	/**
	 * If proactive authentication should be used. If this is true a user will
	 * always be authenticated if credentials are present.
	 */
	@ModelNodeBinding(detypedName = "proactive-authentication")
	public Boolean proactiveAuthentication() {
		return this.proactiveAuthentication;
	}

	/**
	 * If proactive authentication should be used. If this is true a user will
	 * always be authenticated if credentials are present.
	 */
	@SuppressWarnings("unchecked")
	public T proactiveAuthentication(java.lang.Boolean value) {
		Object oldValue = this.proactiveAuthentication;
		this.proactiveAuthentication = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("proactiveAuthentication", oldValue,
					value);
		return (T) this;
	}

	/**
	 * The length of the generated session ID. Longer session ID's are more
	 * secure. This number refers to the number of bytes of randomness that are
	 * used to generate the session ID, the actual ID that is sent to the client
	 * will be base64 encoded so will be approximately 33% larger (e.g. a
	 * session id length of 30 will result in a cookie value of length 40).
	 */
	@ModelNodeBinding(detypedName = "session-id-length")
	public Integer sessionIdLength() {
		return this.sessionIdLength;
	}

	/**
	 * The length of the generated session ID. Longer session ID's are more
	 * secure. This number refers to the number of bytes of randomness that are
	 * used to generate the session ID, the actual ID that is sent to the client
	 * will be base64 encoded so will be approximately 33% larger (e.g. a
	 * session id length of 30 will result in a cookie value of length 40).
	 */
	@SuppressWarnings("unchecked")
	public T sessionIdLength(java.lang.Integer value) {
		Object oldValue = this.sessionIdLength;
		this.sessionIdLength = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("sessionIdLength", oldValue, value);
		return (T) this;
	}

	/**
	 * If an error page with the stack trace should be generated on error.
	 * Values are all, none and local-only
	 */
	@ModelNodeBinding(detypedName = "stack-trace-on-error")
	public StackTraceOnError stackTraceOnError() {
		return this.stackTraceOnError;
	}

	/**
	 * If an error page with the stack trace should be generated on error.
	 * Values are all, none and local-only
	 */
	@SuppressWarnings("unchecked")
	public T stackTraceOnError(StackTraceOnError value) {
		Object oldValue = this.stackTraceOnError;
		this.stackTraceOnError = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("stackTraceOnError", oldValue, value);
		return (T) this;
	}

	/**
	 * Use encoding defined on listener
	 */
	@ModelNodeBinding(detypedName = "use-listener-encoding")
	public Boolean useListenerEncoding() {
		return this.useListenerEncoding;
	}

	/**
	 * Use encoding defined on listener
	 */
	@SuppressWarnings("unchecked")
	public T useListenerEncoding(java.lang.Boolean value) {
		Object oldValue = this.useListenerEncoding;
		this.useListenerEncoding = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("useListenerEncoding", oldValue, value);
		return (T) this;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy