public final class ProxyHandler extends Object implements HttpHandler
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.| Constructor and Description |
|---|
ProxyHandler(ProxyClient proxyClient,
HttpHandler next) |
ProxyHandler(ProxyClient proxyClient,
int maxRequestTime,
HttpHandler next) |
| Modifier and Type | Method and Description |
|---|---|
ProxyHandler |
addRequestHeader(HttpString header,
ExchangeAttribute attribute)
Adds a request header to the outgoing request.
|
ProxyHandler |
addRequestHeader(HttpString header,
String value)
Adds a request header to the outgoing request.
|
ProxyHandler |
addRequestHeader(HttpString header,
String attribute,
ClassLoader classLoader)
Adds a request header to the outgoing request.
|
ProxyClient |
getProxyClient() |
void |
handleRequest(HttpServerExchange exchange)
Handle the request.
|
ProxyHandler |
removeRequestHeader(HttpString header)
Removes a request header
|
public static final String UTF_8
public ProxyHandler(ProxyClient proxyClient, int maxRequestTime, HttpHandler next)
public ProxyHandler(ProxyClient proxyClient, HttpHandler next)
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandlerhandleRequest in interface HttpHandlerexchange - the HTTP request/response exchangeExceptionpublic ProxyHandler addRequestHeader(HttpString header, ExchangeAttribute attribute)
header - The header nameattribute - The header value attribute.public ProxyHandler addRequestHeader(HttpString header, String value)
header - The header namevalue - The header value attribute.public ProxyHandler addRequestHeader(HttpString header, String attribute, ClassLoader classLoader)
header - The header nameattribute - The header value attribute.public ProxyHandler removeRequestHeader(HttpString header)
header - the headerpublic ProxyClient getProxyClient()
Copyright © 2014 JBoss by Red Hat. All rights reserved.