This handler acts like a filter. The ProxyClient has a chance to decide if it
knows how to proxy the request. If it does then it will provide a connection that can
used to connect to the remote server, otherwise the next handler will be invoked and the
request will proceed as normal.
This handler uses non blocking IO
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final AttachmentKey | |
| private static final int | |
| private static final AttachmentKey | |
| private final Predicate | |
| private static final Logger | |
| private volatile int | |
| private final int | |
| private final HttpHandler | |
| private final ProxyClient | |
| private final Map | requestHeaders
Map of additional headers to add to the request. |
| private volatile boolean | |
| private volatile boolean | |
| private static final AttachmentKey | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ProxyHandler(ProxyClient
the client to use to make the proxy call proxyClient, int the maximum amount of time to allow the request to be processed maxRequestTime, HttpHandler the next handler in line next, boolean should the HOST header be rewritten to use the target host of the call. rewriteHostHeader, boolean should any existing X-Forwarded-For header be used or should it be overwritten. reuseXForwarded)
Deprecated
|
| public | ProxyHandler(ProxyClient
the client to use to make the proxy call proxyClient, int the maximum amount of time to allow the request to be processed maxRequestTime, HttpHandler the next handler in line next, boolean should the HOST header be rewritten to use the target host of the call. rewriteHostHeader, boolean should any existing X-Forwarded-For header be used or should it be overwritten. reuseXForwarded, int maxConnectionRetries)
Deprecated
|
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ProxyHandler | Returns: thisThe header name header, final ExchangeAttribute The header value attribute. attribute)
Deprecated
Adds a request header to the outgoing request. |
| public ProxyHandler | Returns: thisThe header name header, final String The header value attribute. value)
Deprecated
Adds a request header to the outgoing request. |
| public ProxyHandler | Returns: thisThe header name header, final String The header value attribute. attribute, final ClassLoader classLoader)
Deprecated
Adds a request header to the outgoing request. |
| public static ProxyHandler. | |
| pack-priv static void | |
| public Predicate | |
| public int | |
| public ProxyClient | |
| pack-priv static void | handleFailure(HttpServerExchange exchange, ProxyHandler.
|
| public void | handleRequest(final HttpServerExchange
the HTTP request/response exchange exchange)Implements io. Handle the request. |
| public boolean | |
| public boolean | |
| public ProxyHandler | Returns: thisthe header header)
Deprecated
Removes a request header |
| public ProxyHandler | |
| public ProxyHandler | |
| public ProxyHandler | |
| public String |