| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static final AccessControlListHandler | Returns: A new user agent access control handlerThe next handler in the chain next, boolean Determine if a non-matching user agent will be allowed by default defaultAllow, ExchangeAttribute attribute)Returns a new handler that can allow or deny access to a resource based an at attribute of the exchange |
| public static DateHandler | Returns: A new date handlerThe next handler in the chain next)
Deprecated
Returns a new HTTP handler that sets the Date: header. |
| public static HttpHandler | Returns: The handlerThe next handler next)Handler that sets the headers that disable caching of the response |
| public static ExceptionHandler | Returns: The exception handlerThe next handler next)Returns a handler that maps exceptions to additional handlers |
| public static GracefulShutdownHandler | Returns: The graceful shutdown handlerThe next http handler next)Returns a new handler that can be used to wait for all requests to finish before shutting down the server gracefully. |
| public static void | |
| public static SetHeaderHandler | Returns: A new set header handlerThe next handler in the chain next, final String The name of the header headerName, final String The header value headerValue)Returns a handler that sets a response header |
| public static SetHeaderHandler | Returns: A new set header handlerThe next handler in the chain next, final String The name of the header headerName, final ExchangeAttribute The header value headerValue)Returns a handler that sets a response header |
| public static final HttpContinueAcceptingHandler | Returns: The accepting handlerThe next handler next, final Predicate The predicate used to determine if the request should be accepted accept)Returns a handler that sends back a HTTP 100 continue response if the given predicate resolves to true. |
| public static final HttpContinueAcceptingHandler | Returns: The accepting handlerThe next handler next)Returns a handler that sends back a HTTP 100 continue response to all requests. |
| public static final HttpContinueReadHandler | Returns: A new continue handlerThe next handler in the chain next)A handler that automatically handles HTTP 100-continue responses, by sending a continue response when the first attempt is made to read from the request channel. |
| public static final IPAddressAccessControlHandler | Returns: A new IP access control handlerThe next handler in the chain next, boolean Determine if a non-matching address will be allowed by default defaultAllow)Returns a new handler that can allow or deny access to a resource based on IP address |
| public static JvmRouteHandler | Returns: The handlerThe session cookie name sessionCookieName, final String The JVM route to append jvmRoute, HttpHandler The next handler next)Handler that appends the JVM route to the session cookie |
| public static LearningPushHandler | Returns: A caching push handlerThe maximum number of entries to store maxEntries, int The maximum age of the entries maxAge, HttpHandler The next handler next)Creates a handler that automatically learns which resources to push based on the referer header |
| public static LearningPushHandler | Returns: A caching push handlerThe maximum number of entries to store maxEntries, HttpHandler The next handler next)Creates a handler that automatically learns which resources to push based on the referer header |
| public static PathHandler | Returns: A new path handlerThe default handler defaultHandler)Creates a new path handler, with the default handler specified |
| public static PathHandler | |
| public static PathTemplateHandler | |
| public static PathTemplateHandler | Returns: The path template handlerIf the query params should be rewritten rewriteQueryParams)
|
| public static PredicateHandler | Returns: A new predicate handlerThe predicate predicate, final HttpHandler The handler that will be executed if the predicate is true trueHandler, final HttpHandler The handler that will be exected if the predicate is false falseHandler)Returns a new predicate handler, that will delegate to one of the two provided handlers based on the value of the provided predicate. |
| public static HttpHandler | Returns: a handler that sets up a new predicate contextThe next handler next)
|
| public static PredicatesHandler | |
| public static ProxyHandler | Returns: The proxy handlerThe proxy client to use to connect to the remote server proxyClient, int The maximum amount of time a request can be in progress before it is forcibly closed maxRequestTime, HttpHandler The next handler to invoke if the proxy client does not know how to proxy the request next)Returns a handler that can act as a load balancing reverse proxy. |
| public static ProxyHandler | Returns: The proxy handlerThe proxy client to use to connect to the remote server proxyClient, HttpHandler The next handler to invoke if the proxy client does not know how to proxy the request next)Returns a handler that can act as a load balancing reverse proxy. |
| public static ProxyHandler | Returns: The proxy handlerThe proxy client to use to connect to the remote server proxyClient)Returns a handler that can act as a load balancing reverse proxy. |
| public static ProxyPeerAddressHandler | Returns: The handlerThe next http handler next)Returns a new handler that sets the peer address based on the X-Forwarded-For and X-Forwarded-Proto header |
| public static RedirectHandler | |
| public static HttpHandler | Returns: The request dumping handlerThe next handler next)Returns a handler that dumps requests to the log for debugging purposes. |
| public static RequestLimitingHandler | Returns: The handlerThe maximum number of requests maxRequest, final int The maximum number of queued requests queueSize, HttpHandler The next handler next)Returns a handler that limits the maximum number of requests that can run at a time. |
| public static RequestLimitingHandler | Returns: The handlerThe request limit object that can be shared between handlers, to apply the same limits across multiple handlers requestLimit, HttpHandler The next handler next)Returns a handler that limits the maximum number of requests that can run at a time. |
| public static ResourceHandler | Returns: A new resource handlerThe resource manager to use resourceManager)Return a new resource handler |
| public static ResponseRateLimitingHandler | responseRateLimitingHandler(HttpHandler
The next handler next, int The number of bytes per time period bytes, long The time period time, TimeUnit The units of the time period timeUnit)A handler that limits the download speed to a set number of bytes/period |
| public static HttpHandler | rewrite(final String
The rewrite condition condition, final String The rewrite target if the condition matches target, final ClassLoader classLoader, final HttpHandler The next handler next)Creates the set of handlers that are required to perform a simple rewrite. |
| public static RoutingHandler | Returns: The routing handlerIf the query params should be rewritten rewriteQueryParams)
|
| public static RoutingHandler | |
| public static ServerSentEventHandler | Returns: A new server sent events handlerThe server sent events callback callback)A handler for server sent events |
| public static ServerSentEventHandler | |
| public static SetAttributeHandler | Returns: The handlerThe next handler next, final String The attribute to set, specified as a string presentation of an attribute, final String io.The value to set, specified an a string representation of an value, final ClassLoader io.The class loader to use to parser the exchange attributes classLoader)Returns an attribute setting handler that can be used to set an arbitrary attribute on the exchange. |
| public static SetErrorHandler | Returns: A Set Error handlerThe response code to set responseCode, HttpHandler The next handler next)A handler that sets response code but continues the exchange so the servlet's error page can be returned. |
| public static HttpTraceHandler | Returns: A HTTP trace handlerThe next handler in the chain next)Returns a new HTTP trace handler. |
| public static final URLDecodingHandler | Returns: a new url decoding handlerThe next handler in the chain next, final String The charset to decode to charset)A handler that will decode the URL, query parameters and to the specified charset. |
| public static HttpHandler | Returns: A handler that decodes the URLThe charset to decode charset, final HttpHandler The next handler next)Returns a new handler that decodes the URL and query parameters into the specified charset, assuming it has not already been done by the connector. |
| public static NameVirtualHostHandler | |
| public static NameVirtualHostHandler | Returns: A new virtual host handlerCreates a new virtual host handler using the provided default handler |
| public static NameVirtualHostHandler | Returns: A new virtual host handlerThe host handler hostHandler, String... The host names hostnames)Creates a new virtual host handler that uses the provided handler as the root handler for the given hostnames. |
| public static NameVirtualHostHandler | Returns: A new virtual host handlerThe default handler defaultHandler, final HttpHandler The host handler hostHandler, String... The host names hostnames)Creates a new virtual host handler that uses the provided handler as the root handler for the given hostnames. |
| public static WebSocketProtocolHandshakeHandler | Returns: The web socket handlerThe web socket session handler sessionHandler)
|
| public static WebSocketProtocolHandshakeHandler | Returns: The web socket handlerThe web socket session handler sessionHandler, final HttpHandler The handler to invoke if the web socket connection fails next)
|
| Handlers | back to summary |
|---|---|
| private Handlers() | |
| acl | back to summary |
|---|---|
| public static final AccessControlListHandler acl(final HttpHandler next, boolean defaultAllow, ExchangeAttribute attribute) Returns a new handler that can allow or deny access to a resource based an at attribute of the exchange
| |
| date | back to summary |
|---|---|
| public static DateHandler date(final HttpHandler next)
Deprecated
Returns a new HTTP handler that sets the Date: header. This is no longer necessary, as it is handled by the connectors directly.
| |
| disableCache | back to summary |
|---|---|
| public static HttpHandler disableCache(final HttpHandler next) Handler that sets the headers that disable caching of the response
| |
| exceptionHandler | back to summary |
|---|---|
| public static ExceptionHandler exceptionHandler(final HttpHandler next) Returns a handler that maps exceptions to additional handlers
| |
| gracefulShutdown | back to summary |
|---|---|
| public static GracefulShutdownHandler gracefulShutdown(HttpHandler next) Returns a new handler that can be used to wait for all requests to finish before shutting down the server gracefully.
| |
| handlerNotNull | back to summary |
|---|---|
| public static void handlerNotNull(final HttpHandler handler) | |
| header | back to summary |
|---|---|
| public static SetHeaderHandler header(final HttpHandler next, final String headerName, final String headerValue) Returns a handler that sets a response header
| |
| header | back to summary |
|---|---|
| public static SetHeaderHandler header(final HttpHandler next, final String headerName, final ExchangeAttribute headerValue) Returns a handler that sets a response header
| |
| httpContinueAccepting | back to summary |
|---|---|
| public static final HttpContinueAcceptingHandler httpContinueAccepting(final HttpHandler next, final Predicate accept) Returns a handler that sends back a HTTP 100 continue response if the given predicate resolves to true.
This handler differs from the one returned by
| |
| httpContinueAccepting | back to summary |
|---|---|
| public static final HttpContinueAcceptingHandler httpContinueAccepting(final HttpHandler next) Returns a handler that sends back a HTTP 100 continue response to all requests.
This handler differs from the one returned by
| |
| httpContinueRead | back to summary |
|---|---|
| public static final HttpContinueReadHandler httpContinueRead(final HttpHandler next) A handler that automatically handles HTTP 100-continue responses, by sending a continue response when the first attempt is made to read from the request channel.
| |
| ipAccessControl | back to summary |
|---|---|
| public static final IPAddressAccessControlHandler ipAccessControl(final HttpHandler next, boolean defaultAllow) Returns a new handler that can allow or deny access to a resource based on IP address
| |
| jvmRoute | back to summary |
|---|---|
| public static JvmRouteHandler jvmRoute(final String sessionCookieName, final String jvmRoute, HttpHandler next) Handler that appends the JVM route to the session cookie
| |
| learningPushHandler | back to summary |
|---|---|
| public static LearningPushHandler learningPushHandler(int maxEntries, int maxAge, HttpHandler next) Creates a handler that automatically learns which resources to push based on the referer header
| |
| learningPushHandler | back to summary |
|---|---|
| public static LearningPushHandler learningPushHandler(int maxEntries, HttpHandler next) Creates a handler that automatically learns which resources to push based on the referer header
| |
| path | back to summary |
|---|---|
| public static PathHandler path(final HttpHandler defaultHandler) Creates a new path handler, with the default handler specified
| |
| path | back to summary |
|---|---|
| public static PathHandler path() Creates a new path handler
| |
| pathTemplate | back to summary |
|---|---|
public static PathTemplateHandler pathTemplate()
| |
| pathTemplate | back to summary |
|---|---|
public static PathTemplateHandler pathTemplate(boolean rewriteQueryParams)
| |
| predicate | back to summary |
|---|---|
| public static PredicateHandler predicate(final Predicate predicate, final HttpHandler trueHandler, final HttpHandler falseHandler) Returns a new predicate handler, that will delegate to one of the two provided handlers based on the value of the provided predicate.
| |
| predicateContext | back to summary |
|---|---|
public static HttpHandler predicateContext(HttpHandler next)
| |
| predicates | back to summary |
|---|---|
| public static PredicatesHandler predicates(final List<PredicatedHandler> handlers, HttpHandler next) | |
| proxyHandler | back to summary |
|---|---|
| public static ProxyHandler proxyHandler(ProxyClient proxyClient, int maxRequestTime, HttpHandler next) Returns a handler that can act as a load balancing reverse proxy.
| |
| proxyHandler | back to summary |
|---|---|
| public static ProxyHandler proxyHandler(ProxyClient proxyClient, HttpHandler next) Returns a handler that can act as a load balancing reverse proxy.
| |
| proxyHandler | back to summary |
|---|---|
| public static ProxyHandler proxyHandler(ProxyClient proxyClient) Returns a handler that can act as a load balancing reverse proxy.
| |
| proxyPeerAddress | back to summary |
|---|---|
| public static ProxyPeerAddressHandler proxyPeerAddress(HttpHandler next) Returns a new handler that sets the peer address based on the X-Forwarded-For and X-Forwarded-Proto header
| |
| redirect | back to summary |
|---|---|
| public static RedirectHandler redirect(final String location) Returns a new redirect handler
| |
| requestDump | back to summary |
|---|---|
| public static HttpHandler requestDump(final HttpHandler next) Returns a handler that dumps requests to the log for debugging purposes.
| |
| requestLimitingHandler | back to summary |
|---|---|
| public static RequestLimitingHandler requestLimitingHandler(final int maxRequest, final int queueSize, HttpHandler next) Returns a handler that limits the maximum number of requests that can run at a time.
| |
| requestLimitingHandler | back to summary |
|---|---|
| public static RequestLimitingHandler requestLimitingHandler(final RequestLimit requestLimit, HttpHandler next) Returns a handler that limits the maximum number of requests that can run at a time.
| |
| resource | back to summary |
|---|---|
| public static ResourceHandler resource(final ResourceManager resourceManager) Return a new resource handler
| |
| responseRateLimitingHandler | back to summary |
|---|---|
| public static ResponseRateLimitingHandler responseRateLimitingHandler(HttpHandler next, int bytes, long time, TimeUnit timeUnit) A handler that limits the download speed to a set number of bytes/period
| |
| rewrite | back to summary |
|---|---|
| public static HttpHandler rewrite(final String condition, final String target, final ClassLoader classLoader, final HttpHandler next) Creates the set of handlers that are required to perform a simple rewrite.
| |
| routing | back to summary |
|---|---|
public static RoutingHandler routing(boolean rewriteQueryParams)
| |
| routing | back to summary |
|---|---|
public static RoutingHandler routing()
| |
| serverSentEvents | back to summary |
|---|---|
| public static ServerSentEventHandler serverSentEvents(ServerSentEventConnectionCallback callback) A handler for server sent events
| |
| serverSentEvents | back to summary |
|---|---|
| public static ServerSentEventHandler serverSentEvents() A handler for server sent events
| |
| setAttribute | back to summary |
|---|---|
| public static SetAttributeHandler setAttribute(final HttpHandler next, final String attribute, final String value, final ClassLoader classLoader) Returns an attribute setting handler that can be used to set an arbitrary attribute on the exchange. This includes functions such as adding and removing headers etc.
| |
| setErrorHandler | back to summary |
|---|---|
| public static SetErrorHandler setErrorHandler(int responseCode, HttpHandler next) A handler that sets response code but continues the exchange so the servlet's error page can be returned.
| |
| trace | back to summary |
|---|---|
| public static HttpTraceHandler trace(final HttpHandler next) Returns a new HTTP trace handler. This handler will handle HTTP TRACE requests as per the RFC. Warning enabling trace requests may leak information, in general it is recommended that these be disabled for security reasons.
| |
| urlDecoding | back to summary |
|---|---|
| public static final URLDecodingHandler urlDecoding(final HttpHandler next, final String charset) A handler that will decode the URL, query parameters and to the specified charset.
If you are using this handler you must set the This is not as efficient as using the parsers built in UTF-8 decoder. Unless you need to decode to something other than UTF-8 you should rely on the parsers decoding instead.
| |
| urlDecodingHandler | back to summary |
|---|---|
| public static HttpHandler urlDecodingHandler(final String charset, final HttpHandler next) Returns a new handler that decodes the URL and query parameters into the specified charset, assuming it
has not already been done by the connector. For this handler to take effect the parameter
| |
| virtualHost | back to summary |
|---|---|
| public static NameVirtualHostHandler virtualHost() Creates a new virtual host handler
| |
| virtualHost | back to summary |
|---|---|
| public static NameVirtualHostHandler virtualHost(final HttpHandler defaultHandler) Creates a new virtual host handler using the provided default handler
| |
| virtualHost | back to summary |
|---|---|
| public static NameVirtualHostHandler virtualHost(final HttpHandler hostHandler, String... hostnames) Creates a new virtual host handler that uses the provided handler as the root handler for the given hostnames.
| |
| virtualHost | back to summary |
|---|---|
| public static NameVirtualHostHandler virtualHost(final HttpHandler defaultHandler, final HttpHandler hostHandler, String... hostnames) Creates a new virtual host handler that uses the provided handler as the root handler for the given hostnames.
| |
| websocket | back to summary |
|---|---|
public static WebSocketProtocolHandshakeHandler websocket(final WebSocketConnectionCallback sessionHandler)
| |
| websocket | back to summary |
|---|---|
public static WebSocketProtocolHandshakeHandler websocket(final WebSocketConnectionCallback sessionHandler, final HttpHandler next)
| |