Class CasEmbeddedApacheTomcatAjpProperties
java.lang.Object
org.apereo.cas.configuration.model.core.web.tomcat.CasEmbeddedApacheTomcatAjpProperties
- All Implemented Interfaces:
Serializable
@RequiresModule(name="cas-server-webapp-tomcat")
public class CasEmbeddedApacheTomcatAjpProperties
extends Object
implements Serializable
This is
CasEmbeddedApacheTomcatAjpProperties
.- Since:
- 5.3.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe default timeout for asynchronous requests in milliseconds.Additional attributes to be set on the AJP connector in form of key-value pairs.int
The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing.int
getPort()
The TCP port number on which this Connector will create a server socket and await incoming connections.Sets the protocol to handle incoming traffic.int
If this Connector is being used in a proxy configuration, configure this attribute to specify the server port to be returned for calls to request.getServerPort().int
If this Connector is supporting non-SSL requests, and a request is received for which a matchingsecurity-constraint
requires SSL transport, Catalina will automatically redirect the request to the port number specified here.Set this attribute to the name of the protocol you wish to have returned by calls torequest.getScheme()
.Set the secret that must be included with every request.boolean
A boolean value which can be used to enable or disable the TRACE HTTP method.boolean
Enable AJP support in CAS for the embedded Apache Tomcat container.boolean
Set to true if you want calls torequest.getRemoteHost()
to perform DNS lookups in order to return the actual host name of the remote client.boolean
isSecure()
Set this attribute to true if you wish to have calls to request.isSecure() to return true for requests received by this Connector (you would want this on an SSL Connector).setAllowTrace
(boolean allowTrace) A boolean value which can be used to enable or disable the TRACE HTTP method.setAsyncTimeout
(String asyncTimeout) The default timeout for asynchronous requests in milliseconds.setAttributes
(Map<String, String> attributes) Additional attributes to be set on the AJP connector in form of key-value pairs.setEnabled
(boolean enabled) Enable AJP support in CAS for the embedded Apache Tomcat container.setEnableLookups
(boolean enableLookups) Set to true if you want calls torequest.getRemoteHost()
to perform DNS lookups in order to return the actual host name of the remote client.setMaxPostSize
(int maxPostSize) The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing.setPort
(int port) The TCP port number on which this Connector will create a server socket and await incoming connections.setProtocol
(String protocol) Sets the protocol to handle incoming traffic.setProxyPort
(int proxyPort) If this Connector is being used in a proxy configuration, configure this attribute to specify the server port to be returned for calls to request.getServerPort().setRedirectPort
(int redirectPort) If this Connector is supporting non-SSL requests, and a request is received for which a matchingsecurity-constraint
requires SSL transport, Catalina will automatically redirect the request to the port number specified here.Set this attribute to the name of the protocol you wish to have returned by calls torequest.getScheme()
.Set the secret that must be included with every request.setSecure
(boolean secure) Set this attribute to true if you wish to have calls to request.isSecure() to return true for requests received by this Connector (you would want this on an SSL Connector).
-
Constructor Details
-
CasEmbeddedApacheTomcatAjpProperties
public CasEmbeddedApacheTomcatAjpProperties()
-
-
Method Details
-
getProtocol
Sets the protocol to handle incoming traffic. -
getPort
public int getPort()The TCP port number on which this Connector will create a server socket and await incoming connections. Your operating system will allow only one server application to listen to a particular port number on a particular IP address. If the special value of 0 (zero) is used, then Tomcat will select a free port at random to use for this connector. This is typically only useful in embedded and testing applications. -
isSecure
public boolean isSecure()Set this attribute to true if you wish to have calls to request.isSecure() to return true for requests received by this Connector (you would want this on an SSL Connector). The default value is false. -
getSecret
Set the secret that must be included with every request. -
isAllowTrace
public boolean isAllowTrace()A boolean value which can be used to enable or disable the TRACE HTTP method. If not specified, this attribute is set to false. -
getScheme
Set this attribute to the name of the protocol you wish to have returned by calls torequest.getScheme()
. For example, you would set this attribute tohttps
for an SSL Connector. -
isEnabled
public boolean isEnabled()Enable AJP support in CAS for the embedded Apache Tomcat container. -
getAsyncTimeout
The default timeout for asynchronous requests in milliseconds. If not specified, this attribute is set to 10000 (10 seconds). -
isEnableLookups
public boolean isEnableLookups()Set to true if you want calls torequest.getRemoteHost()
to perform DNS lookups in order to return the actual host name of the remote client. Set to false to skip the DNS lookup and return the IP address in String form instead (thereby improving performance). By default, DNS lookups are disabled. -
getMaxPostSize
public int getMaxPostSize()The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The feature can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes). -
getProxyPort
public int getProxyPort()If this Connector is being used in a proxy configuration, configure this attribute to specify the server port to be returned for calls to request.getServerPort(). -
getRedirectPort
public int getRedirectPort()If this Connector is supporting non-SSL requests, and a request is received for which a matchingsecurity-constraint
requires SSL transport, Catalina will automatically redirect the request to the port number specified here. -
getAttributes
Additional attributes to be set on the AJP connector in form of key-value pairs. Examples include:tomcatAuthentication
: If set to true, the authentication will be done in Tomcat. Otherwise, the authenticated principal will be propagated from the native webserver and used for authorization in Tomcat. Note that this principal will have no roles associated with it. The default value is true.maxThreads
: The maximum number of request processing threads to be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, this attribute is set to 200. If an executor is associated with this connector, this attribute is ignored as the connector will execute tasks using the executor rather than an internal thread pool.keepAliveTimeout
: The number of milliseconds this Connector will wait for another AJP request before closing the connection. The default value is to use the value that has been set for the connectionTimeout attribute.maxCookieCount
: The maximum number of cookies that are permitted for a request. A value of less than zero means no limit. If not specified, a default value of 200 will be used.bufferSize
: The size of the output buffer to use. If less than or equal to zero, then output buffering is disabled. The default value is -1 (i.e. buffering disabled)clientCertProvider
: When client certificate information is presented in a form other than instances of java.security.cert.X509Certificate it needs to be converted before it can be used and this property controls which JSSE provider is used to perform the conversion. For example it is used with the AJP connectors, the HTTP APR connector and with the org.apache.catalina.valves.SSLValve.If not specified, the default provider will be used.connectionTimeout
: The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is infinite (i.e. no timeout).address
: For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified port. By default, this port will be used on all IP addresses associated with the server. A value of 127.0.0.1 indicates that the Connector will only listen on the loopback interface.
See the Apache Tomcat documentation for a full list.
-
setProtocol
Sets the protocol to handle incoming traffic.- Returns:
this
.
-
setPort
The TCP port number on which this Connector will create a server socket and await incoming connections. Your operating system will allow only one server application to listen to a particular port number on a particular IP address. If the special value of 0 (zero) is used, then Tomcat will select a free port at random to use for this connector. This is typically only useful in embedded and testing applications.- Returns:
this
.
-
setSecure
Set this attribute to true if you wish to have calls to request.isSecure() to return true for requests received by this Connector (you would want this on an SSL Connector). The default value is false.- Returns:
this
.
-
setSecret
Set the secret that must be included with every request.- Returns:
this
.
-
setAllowTrace
A boolean value which can be used to enable or disable the TRACE HTTP method. If not specified, this attribute is set to false.- Returns:
this
.
-
setScheme
Set this attribute to the name of the protocol you wish to have returned by calls torequest.getScheme()
. For example, you would set this attribute tohttps
for an SSL Connector.- Returns:
this
.
-
setEnabled
Enable AJP support in CAS for the embedded Apache Tomcat container.- Returns:
this
.
-
setAsyncTimeout
The default timeout for asynchronous requests in milliseconds. If not specified, this attribute is set to 10000 (10 seconds).- Returns:
this
.
-
setEnableLookups
Set to true if you want calls torequest.getRemoteHost()
to perform DNS lookups in order to return the actual host name of the remote client. Set to false to skip the DNS lookup and return the IP address in String form instead (thereby improving performance). By default, DNS lookups are disabled.- Returns:
this
.
-
setMaxPostSize
The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The feature can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).- Returns:
this
.
-
setProxyPort
If this Connector is being used in a proxy configuration, configure this attribute to specify the server port to be returned for calls to request.getServerPort().- Returns:
this
.
-
setRedirectPort
If this Connector is supporting non-SSL requests, and a request is received for which a matchingsecurity-constraint
requires SSL transport, Catalina will automatically redirect the request to the port number specified here.- Returns:
this
.
-
setAttributes
Additional attributes to be set on the AJP connector in form of key-value pairs. Examples include:tomcatAuthentication
: If set to true, the authentication will be done in Tomcat. Otherwise, the authenticated principal will be propagated from the native webserver and used for authorization in Tomcat. Note that this principal will have no roles associated with it. The default value is true.maxThreads
: The maximum number of request processing threads to be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, this attribute is set to 200. If an executor is associated with this connector, this attribute is ignored as the connector will execute tasks using the executor rather than an internal thread pool.keepAliveTimeout
: The number of milliseconds this Connector will wait for another AJP request before closing the connection. The default value is to use the value that has been set for the connectionTimeout attribute.maxCookieCount
: The maximum number of cookies that are permitted for a request. A value of less than zero means no limit. If not specified, a default value of 200 will be used.bufferSize
: The size of the output buffer to use. If less than or equal to zero, then output buffering is disabled. The default value is -1 (i.e. buffering disabled)clientCertProvider
: When client certificate information is presented in a form other than instances of java.security.cert.X509Certificate it needs to be converted before it can be used and this property controls which JSSE provider is used to perform the conversion. For example it is used with the AJP connectors, the HTTP APR connector and with the org.apache.catalina.valves.SSLValve.If not specified, the default provider will be used.connectionTimeout
: The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is infinite (i.e. no timeout).address
: For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified port. By default, this port will be used on all IP addresses associated with the server. A value of 127.0.0.1 indicates that the Connector will only listen on the loopback interface.
See the Apache Tomcat documentation for a full list.
- Returns:
this
.
-