org.wildfly.swarm.config.undertow.server

## Class HTTPListener<T extends HTTPListener<T>>

- java.lang.Object
- - org.wildfly.swarm.config.undertow.server.HTTPListener<T>

-     public class HTTPListener<T extends HTTPListener<T>>
      extends Object

  http listener

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HTTPListener(String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `Boolean` | `allowEncodedSlash()` If a request comes in with encoded / characters (i.e.
    `T` | `allowEncodedSlash(Boolean value)` If a request comes in with encoded / characters (i.e.
    `Boolean` | `allowEqualsInCookieValue()` If this is true then Undertow will allow non-escaped equals characters in unquoted cookie values.
    `T` | `allowEqualsInCookieValue(Boolean value)` If this is true then Undertow will allow non-escaped equals characters in unquoted cookie values.
    `Boolean` | `alwaysSetKeepAlive()` If this is true then a Connection: keep-alive header will be added to responses, even when it is not strictly required by the specification.
    `T` | `alwaysSetKeepAlive(Boolean value)` If this is true then a Connection: keep-alive header will be added to responses, even when it is not strictly required by the specification.
    `Boolean` | `bufferPipelinedData()` If we should buffer pipelined requests.
    `T` | `bufferPipelinedData(Boolean value)` If we should buffer pipelined requests.
    `String` | `bufferPool()` The listeners buffer pool
    `T` | `bufferPool(String value)` The listeners buffer pool
    `Long` | `bytesReceived()` The number of bytes that have been received by this listener
    `T` | `bytesReceived(Long value)` The number of bytes that have been received by this listener
    `Long` | `bytesSent()` The number of bytes that have been sent out on this listener
    `T` | `bytesSent(Long value)` The number of bytes that have been sent out on this listener
    `Boolean` | `certificateForwarding()` If certificate forwarding should be enabled.
    `T` | `certificateForwarding(Boolean value)` If certificate forwarding should be enabled.
    `Boolean` | `decodeUrl()` If this is true then the parser will decode the URL and query parameters using the selected character encoding (UTF-8 by default).
    `T` | `decodeUrl(Boolean value)` If this is true then the parser will decode the URL and query parameters using the selected character encoding (UTF-8 by default).
    `T` | `disallowedMethod(String value)` A comma separated list of HTTP methods that are not allowed
    `List<String>` | `disallowedMethods()` A comma separated list of HTTP methods that are not allowed
    `T` | `disallowedMethods(List<String> value)` A comma separated list of HTTP methods that are not allowed
    `T` | `disallowedMethods(String... args)` A comma separated list of HTTP methods that are not allowed
    `Boolean` | `enableHttp2()` Enables HTTP2 support for this listener
    `T` | `enableHttp2(Boolean value)` Enables HTTP2 support for this listener
    `Long` | `errorCount()` The number of 500 responses that have been sent by this listener
    `T` | `errorCount(Long value)` The number of 500 responses that have been sent by this listener
    `String` | `getKey()`
    `Boolean` | `http2EnablePush()` If server push is enabled for this connection
    `T` | `http2EnablePush(Boolean value)` If server push is enabled for this connection
    `Integer` | `http2HeaderTableSize()` The size of the header table used for HPACK compression, in bytes.
    `T` | `http2HeaderTableSize(Integer value)` The size of the header table used for HPACK compression, in bytes.
    `Integer` | `http2InitialWindowSize()` The flow control window size that controls how quickly the client can send data to the server
    `T` | `http2InitialWindowSize(Integer value)` The flow control window size that controls how quickly the client can send data to the server
    `Integer` | `http2MaxConcurrentStreams()` The maximum number of HTTP/2 streams that can be active at any time on a single connection
    `T` | `http2MaxConcurrentStreams(Integer value)` The maximum number of HTTP/2 streams that can be active at any time on a single connection
    `Integer` | `http2MaxFrameSize()` The max HTTP/2 frame size
    `T` | `http2MaxFrameSize(Integer value)` The max HTTP/2 frame size
    `Integer` | `http2MaxHeaderListSize()` The maximum size of request headers the server is prepared to accept
    `T` | `http2MaxHeaderListSize(Integer value)` The maximum size of request headers the server is prepared to accept
    `Integer` | `maxBufferedRequestSize()` Maximum size of a buffered request, in bytes.
    `T` | `maxBufferedRequestSize(Integer value)` Maximum size of a buffered request, in bytes.
    `Integer` | `maxConnections()` The maximum number of concurrent connections.
    `T` | `maxConnections(Integer value)` The maximum number of concurrent connections.
    `Integer` | `maxCookies()` The maximum number of cookies that will be parsed.
    `T` | `maxCookies(Integer value)` The maximum number of cookies that will be parsed.
    `Integer` | `maxHeaders()` The maximum number of headers that will be parsed.
    `T` | `maxHeaders(Integer value)` The maximum number of headers that will be parsed.
    `Integer` | `maxHeaderSize()` The maximum size of a http request header, in bytes.
    `T` | `maxHeaderSize(Integer value)` The maximum size of a http request header, in bytes.
    `Integer` | `maxParameters()` The maximum number of parameters that will be parsed.
    `T` | `maxParameters(Integer value)` The maximum number of parameters that will be parsed.
    `Long` | `maxPostSize()` The maximum size of a post that will be accepted, in bytes.
    `T` | `maxPostSize(Long value)` The maximum size of a post that will be accepted, in bytes.
    `Long` | `maxProcessingTime()` The maximum processing time taken by a request on this listener
    `T` | `maxProcessingTime(Long value)` The maximum processing time taken by a request on this listener
    `Integer` | `noRequestTimeout()` The length of time in milliseconds that the connection can be idle before it is closed by the container.
    `T` | `noRequestTimeout(Integer value)` The length of time in milliseconds that the connection can be idle before it is closed by the container.
    `Long` | `processingTime()` The total processing time of all requests handed by this listener
    `T` | `processingTime(Long value)` The total processing time of all requests handed by this listener
    `Boolean` | `proxyAddressForwarding()` Enables handling of x-forwarded-host header (and other x-forwarded-* headers) and use this header information to set the remote address.
    `T` | `proxyAddressForwarding(Boolean value)` Enables handling of x-forwarded-host header (and other x-forwarded-* headers) and use this header information to set the remote address.
    `Integer` | `readTimeout()` Configure a read timeout for a socket, in milliseconds.
    `T` | `readTimeout(Integer value)` Configure a read timeout for a socket, in milliseconds.
    `Integer` | `receiveBuffer()` The receive buffer size, in bytes.
    `T` | `receiveBuffer(Integer value)` The receive buffer size, in bytes.
    `Boolean` | `recordRequestStartTime()` If this is true then Undertow will record the request start time, to allow for request time to be logged.
    `T` | `recordRequestStartTime(Boolean value)` If this is true then Undertow will record the request start time, to allow for request time to be logged.
    `String` | `redirectSocket()` If this listener is supporting non-SSL requests, and a request is received for which a matching requires SSL transport, undertow will automatically redirect the request to the socket binding port specified here.
    `T` | `redirectSocket(String value)` If this listener is supporting non-SSL requests, and a request is received for which a matching requires SSL transport, undertow will automatically redirect the request to the socket binding port specified here.
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `Long` | `requestCount()` The number of requests this listener has served
    `T` | `requestCount(Long value)` The number of requests this listener has served
    `Integer` | `requestParseTimeout()` The maximum amount of time (in milliseconds) that can be spent parsing the request
    `T` | `requestParseTimeout(Integer value)` The maximum amount of time (in milliseconds) that can be spent parsing the request
    `Boolean` | `requireHostHttp11()` Require that all HTTP/1.1 requests have a 'Host' header, as per the RFC.
    `T` | `requireHostHttp11(Boolean value)` Require that all HTTP/1.1 requests have a 'Host' header, as per the RFC.
    `Boolean` | `resolvePeerAddress()` Enables host dns lookup
    `T` | `resolvePeerAddress(Boolean value)` Enables host dns lookup
    `Boolean` | `rfc6265CookieValidation()` If cookies should be validated to ensure they comply with RFC6265.
    `T` | `rfc6265CookieValidation(Boolean value)` If cookies should be validated to ensure they comply with RFC6265.
    `Boolean` | `secure()` If this is true then requests that originate from this listener are marked as secure, even if the request is not using HTTPS.
    `T` | `secure(Boolean value)` If this is true then requests that originate from this listener are marked as secure, even if the request is not using HTTPS.
    `Integer` | `sendBuffer()` The send buffer size, in bytes.
    `T` | `sendBuffer(Integer value)` The send buffer size, in bytes.
    `String` | `socketBinding()` The listener socket binding
    `T` | `socketBinding(String value)` The listener socket binding
    `Integer` | `tcpBacklog()` Configure a server with the specified backlog.
    `T` | `tcpBacklog(Integer value)` Configure a server with the specified backlog.
    `Boolean` | `tcpKeepAlive()` Configure a channel to send TCP keep-alive messages in an implementation-dependent manner.
    `T` | `tcpKeepAlive(Boolean value)` Configure a channel to send TCP keep-alive messages in an implementation-dependent manner.
    `String` | `urlCharset()` URL charset
    `T` | `urlCharset(String value)` URL charset
    `String` | `worker()` The listeners XNIO worker
    `T` | `worker(String value)` The listeners XNIO worker
    `Integer` | `writeTimeout()` Configure a write timeout for a socket, in milliseconds.
    `T` | `writeTimeout(Integer value)` Configure a write timeout for a socket, in milliseconds.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HTTPListener

          public HTTPListener(String key)

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### allowEncodedSlash

          public Boolean allowEncodedSlash()

      If a request comes in with encoded / characters (i.e. %2F), will these be decoded.

    - #### allowEncodedSlash

          public T allowEncodedSlash(Boolean value)

      If a request comes in with encoded / characters (i.e. %2F), will these be decoded.

    - #### allowEqualsInCookieValue

          public Boolean allowEqualsInCookieValue()

      If this is true then Undertow will allow non-escaped equals characters in unquoted cookie values. Unquoted cookie values may not contain equals characters. If present the value ends before the equals sign. The remainder of the cookie value will be dropped.

    - #### allowEqualsInCookieValue

          public T allowEqualsInCookieValue(Boolean value)

      If this is true then Undertow will allow non-escaped equals characters in unquoted cookie values. Unquoted cookie values may not contain equals characters. If present the value ends before the equals sign. The remainder of the cookie value will be dropped.

    - #### alwaysSetKeepAlive

          public Boolean alwaysSetKeepAlive()

      If this is true then a Connection: keep-alive header will be added to responses, even when it is not strictly required by the specification.

    - #### alwaysSetKeepAlive

          public T alwaysSetKeepAlive(Boolean value)

      If this is true then a Connection: keep-alive header will be added to responses, even when it is not strictly required by the specification.

    - #### bufferPipelinedData

          public Boolean bufferPipelinedData()

      If we should buffer pipelined requests.

    - #### bufferPipelinedData

          public T bufferPipelinedData(Boolean value)

      If we should buffer pipelined requests.

    - #### bufferPool

          public String bufferPool()

      The listeners buffer pool

    - #### bufferPool

          public T bufferPool(String value)

      The listeners buffer pool

    - #### bytesReceived

          public Long bytesReceived()

      The number of bytes that have been received by this listener

    - #### bytesReceived

          public T bytesReceived(Long value)

      The number of bytes that have been received by this listener

    - #### bytesSent

          public Long bytesSent()

      The number of bytes that have been sent out on this listener

    - #### bytesSent

          public T bytesSent(Long value)

      The number of bytes that have been sent out on this listener

    - #### certificateForwarding

          public Boolean certificateForwarding()

      If certificate forwarding should be enabled. If this is enabled then the listener will take the certificate from the SSL_CLIENT_CERT attribute. This should only be enabled if behind a proxy, and the proxy is configured to always set these headers.

    - #### certificateForwarding

          public T certificateForwarding(Boolean value)

      If certificate forwarding should be enabled. If this is enabled then the listener will take the certificate from the SSL_CLIENT_CERT attribute. This should only be enabled if behind a proxy, and the proxy is configured to always set these headers.

    - #### decodeUrl

          public Boolean decodeUrl()

      If this is true then the parser will decode the URL and query parameters using the selected character encoding (UTF-8 by default). If this is false they will not be decoded. This will allow a later handler to decode them into whatever charset is desired.

    - #### decodeUrl

          public T decodeUrl(Boolean value)

      If this is true then the parser will decode the URL and query parameters using the selected character encoding (UTF-8 by default). If this is false they will not be decoded. This will allow a later handler to decode them into whatever charset is desired.

    - #### disallowedMethods

          public List<String> disallowedMethods()

      A comma separated list of HTTP methods that are not allowed

    - #### disallowedMethods

          public T disallowedMethods(List<String> value)

      A comma separated list of HTTP methods that are not allowed

    - #### disallowedMethod

          public T disallowedMethod(String value)

      A comma separated list of HTTP methods that are not allowed

    - #### disallowedMethods

          public T disallowedMethods(String... args)

      A comma separated list of HTTP methods that are not allowed

    - #### enableHttp2

          public Boolean enableHttp2()

      Enables HTTP2 support for this listener

    - #### enableHttp2

          public T enableHttp2(Boolean value)

      Enables HTTP2 support for this listener

    - #### errorCount

          public Long errorCount()

      The number of 500 responses that have been sent by this listener

    - #### errorCount

          public T errorCount(Long value)

      The number of 500 responses that have been sent by this listener

    - #### http2EnablePush

          public Boolean http2EnablePush()

      If server push is enabled for this connection

    - #### http2EnablePush

          public T http2EnablePush(Boolean value)

      If server push is enabled for this connection

    - #### http2HeaderTableSize

          public Integer http2HeaderTableSize()

      The size of the header table used for HPACK compression, in bytes. This amount of memory will be allocated per connection for compression. Larger values use more memory but may give better compression.

    - #### http2HeaderTableSize

          public T http2HeaderTableSize(Integer value)

      The size of the header table used for HPACK compression, in bytes. This amount of memory will be allocated per connection for compression. Larger values use more memory but may give better compression.

    - #### http2InitialWindowSize

          public Integer http2InitialWindowSize()

      The flow control window size that controls how quickly the client can send data to the server

    - #### http2InitialWindowSize

          public T http2InitialWindowSize(Integer value)

      The flow control window size that controls how quickly the client can send data to the server

    - #### http2MaxConcurrentStreams

          public Integer http2MaxConcurrentStreams()

      The maximum number of HTTP/2 streams that can be active at any time on a single connection

    - #### http2MaxConcurrentStreams

          public T http2MaxConcurrentStreams(Integer value)

      The maximum number of HTTP/2 streams that can be active at any time on a single connection

    - #### http2MaxFrameSize

          public Integer http2MaxFrameSize()

      The max HTTP/2 frame size

    - #### http2MaxFrameSize

          public T http2MaxFrameSize(Integer value)

      The max HTTP/2 frame size

    - #### http2MaxHeaderListSize

          public Integer http2MaxHeaderListSize()

      The maximum size of request headers the server is prepared to accept

    - #### http2MaxHeaderListSize

          public T http2MaxHeaderListSize(Integer value)

      The maximum size of request headers the server is prepared to accept

    - #### maxBufferedRequestSize

          public Integer maxBufferedRequestSize()

      Maximum size of a buffered request, in bytes. Requests are not usually buffered, the most common case is when performing SSL renegotiation for a POST request, and the post data must be fully buffered in order to perform the renegotiation.

    - #### maxBufferedRequestSize

          public T maxBufferedRequestSize(Integer value)

      Maximum size of a buffered request, in bytes. Requests are not usually buffered, the most common case is when performing SSL renegotiation for a POST request, and the post data must be fully buffered in order to perform the renegotiation.

    - #### maxConnections

          public Integer maxConnections()

      The maximum number of concurrent connections. Only values greater than 0 are allowed. For unlimited connections simply undefine this attribute value.

    - #### maxConnections

          public T maxConnections(Integer value)

      The maximum number of concurrent connections. Only values greater than 0 are allowed. For unlimited connections simply undefine this attribute value.

    - #### maxCookies

          public Integer maxCookies()

      The maximum number of cookies that will be parsed. This is used to protect against hash vulnerabilities.

    - #### maxCookies

          public T maxCookies(Integer value)

      The maximum number of cookies that will be parsed. This is used to protect against hash vulnerabilities.

    - #### maxHeaderSize

          public Integer maxHeaderSize()

      The maximum size of a http request header, in bytes.

    - #### maxHeaderSize

          public T maxHeaderSize(Integer value)

      The maximum size of a http request header, in bytes.

    - #### maxHeaders

          public Integer maxHeaders()

      The maximum number of headers that will be parsed. This is used to protect against hash vulnerabilities.

    - #### maxHeaders

          public T maxHeaders(Integer value)

      The maximum number of headers that will be parsed. This is used to protect against hash vulnerabilities.

    - #### maxParameters

          public Integer maxParameters()

      The maximum number of parameters that will be parsed. This is used to protect against hash vulnerabilities. This applies to both query parameters, and to POST data, but is not cumulative (i.e. you can potentially have max parameters * 2 total parameters).

    - #### maxParameters

          public T maxParameters(Integer value)

      The maximum number of parameters that will be parsed. This is used to protect against hash vulnerabilities. This applies to both query parameters, and to POST data, but is not cumulative (i.e. you can potentially have max parameters * 2 total parameters).

    - #### maxPostSize

          public Long maxPostSize()

      The maximum size of a post that will be accepted, in bytes.

    - #### maxPostSize

          public T maxPostSize(Long value)

      The maximum size of a post that will be accepted, in bytes.

    - #### maxProcessingTime

          public Long maxProcessingTime()

      The maximum processing time taken by a request on this listener

    - #### maxProcessingTime

          public T maxProcessingTime(Long value)

      The maximum processing time taken by a request on this listener

    - #### noRequestTimeout

          public Integer noRequestTimeout()

      The length of time in milliseconds that the connection can be idle before it is closed by the container.

    - #### noRequestTimeout

          public T noRequestTimeout(Integer value)

      The length of time in milliseconds that the connection can be idle before it is closed by the container.

    - #### processingTime

          public Long processingTime()

      The total processing time of all requests handed by this listener

    - #### processingTime

          public T processingTime(Long value)

      The total processing time of all requests handed by this listener

    - #### proxyAddressForwarding

          public Boolean proxyAddressForwarding()

      Enables handling of x-forwarded-host header (and other x-forwarded-* headers) and use this header information to set the remote address. This should only be used behind a trusted proxy that sets these headers otherwise a remote user can spoof their IP address.

    - #### proxyAddressForwarding

          public T proxyAddressForwarding(Boolean value)

      Enables handling of x-forwarded-host header (and other x-forwarded-* headers) and use this header information to set the remote address. This should only be used behind a trusted proxy that sets these headers otherwise a remote user can spoof their IP address.

    - #### readTimeout

          public Integer readTimeout()

      Configure a read timeout for a socket, in milliseconds. If the given amount of time elapses without a successful read taking place, the socket's next read will throw a `ReadTimeoutException`.

    - #### readTimeout

          public T readTimeout(Integer value)

      Configure a read timeout for a socket, in milliseconds. If the given amount of time elapses without a successful read taking place, the socket's next read will throw a `ReadTimeoutException`.

    - #### receiveBuffer

          public Integer receiveBuffer()

      The receive buffer size, in bytes.

    - #### receiveBuffer

          public T receiveBuffer(Integer value)

      The receive buffer size, in bytes.

    - #### recordRequestStartTime

          public Boolean recordRequestStartTime()

      If this is true then Undertow will record the request start time, to allow for request time to be logged. This has a small but measurable performance impact

    - #### recordRequestStartTime

          public T recordRequestStartTime(Boolean value)

      If this is true then Undertow will record the request start time, to allow for request time to be logged. This has a small but measurable performance impact

    - #### redirectSocket

          public String redirectSocket()

      If this listener is supporting non-SSL requests, and a request is received for which a matching requires SSL transport, undertow will automatically redirect the request to the socket binding port specified here.

    - #### redirectSocket

          public T redirectSocket(String value)

      If this listener is supporting non-SSL requests, and a request is received for which a matching requires SSL transport, undertow will automatically redirect the request to the socket binding port specified here.

    - #### requestCount

          public Long requestCount()

      The number of requests this listener has served

    - #### requestCount

          public T requestCount(Long value)

      The number of requests this listener has served

    - #### requestParseTimeout

          public Integer requestParseTimeout()

      The maximum amount of time (in milliseconds) that can be spent parsing the request

    - #### requestParseTimeout

          public T requestParseTimeout(Integer value)

      The maximum amount of time (in milliseconds) that can be spent parsing the request

    - #### requireHostHttp11

          public Boolean requireHostHttp11()

      Require that all HTTP/1.1 requests have a 'Host' header, as per the RFC. IF the request does not include this header it will be rejected with a 403.

    - #### requireHostHttp11

          public T requireHostHttp11(Boolean value)

      Require that all HTTP/1.1 requests have a 'Host' header, as per the RFC. IF the request does not include this header it will be rejected with a 403.

    - #### resolvePeerAddress

          public Boolean resolvePeerAddress()

      Enables host dns lookup

    - #### resolvePeerAddress

          public T resolvePeerAddress(Boolean value)

      Enables host dns lookup

    - #### rfc6265CookieValidation

          public Boolean rfc6265CookieValidation()

      If cookies should be validated to ensure they comply with RFC6265.

    - #### rfc6265CookieValidation

          public T rfc6265CookieValidation(Boolean value)

      If cookies should be validated to ensure they comply with RFC6265.

    - #### secure

          public Boolean secure()

      If this is true then requests that originate from this listener are marked as secure, even if the request is not using HTTPS.

    - #### secure

          public T secure(Boolean value)

      If this is true then requests that originate from this listener are marked as secure, even if the request is not using HTTPS.

    - #### sendBuffer

          public Integer sendBuffer()

      The send buffer size, in bytes.

    - #### sendBuffer

          public T sendBuffer(Integer value)

      The send buffer size, in bytes.

    - #### socketBinding

          public String socketBinding()

      The listener socket binding

    - #### socketBinding

          public T socketBinding(String value)

      The listener socket binding

    - #### tcpBacklog

          public Integer tcpBacklog()

      Configure a server with the specified backlog.

    - #### tcpBacklog

          public T tcpBacklog(Integer value)

      Configure a server with the specified backlog.

    - #### tcpKeepAlive

          public Boolean tcpKeepAlive()

      Configure a channel to send TCP keep-alive messages in an implementation-dependent manner.

    - #### tcpKeepAlive

          public T tcpKeepAlive(Boolean value)

      Configure a channel to send TCP keep-alive messages in an implementation-dependent manner.

    - #### urlCharset

          public String urlCharset()

      URL charset

    - #### urlCharset

          public T urlCharset(String value)

      URL charset

    - #### worker

          public String worker()

      The listeners XNIO worker

    - #### worker

          public T worker(String value)

      The listeners XNIO worker

    - #### writeTimeout

          public Integer writeTimeout()

      Configure a write timeout for a socket, in milliseconds. If the given amount of time elapses without a successful write taking place, the socket's next write will throw a `WriteTimeoutException`.

    - #### writeTimeout

          public T writeTimeout(Integer value)

      Configure a write timeout for a socket, in milliseconds. If the given amount of time elapses without a successful write taking place, the socket's next write will throw a `WriteTimeoutException`.

Copyright © 2018 JBoss by Red Hat. All rights reserved.