public class HttpFiltersAdapter extends Object implements HttpFilters
HttpFilters.| 限定符和类型 | 字段和说明 |
|---|---|
protected ChannelHandlerContext |
ctx |
static HttpFiltersAdapter |
NOOP_FILTER
A default, stateless, no-op
HttpFilters instance. |
protected io.netty.handler.codec.http.HttpRequest |
originalRequest |
| 构造器和说明 |
|---|
HttpFiltersAdapter(io.netty.handler.codec.http.HttpRequest originalRequest) |
HttpFiltersAdapter(io.netty.handler.codec.http.HttpRequest originalRequest,
ChannelHandlerContext ctx) |
| 限定符和类型 | 方法和说明 |
|---|---|
io.netty.handler.codec.http.HttpResponse |
clientToProxyRequest(io.netty.handler.codec.http.HttpObject httpObject)
Filters requests on their way from the client to the proxy.
|
io.netty.handler.codec.http.HttpObject |
proxyToClientResponse(io.netty.handler.codec.http.HttpObject httpObject)
Filters responses on their way from the proxy to the client.
|
void |
proxyToServerConnectionFailed(FullFlowContext flowContext)
Informs filter that proxy to server connection has failed.
|
void |
proxyToServerConnectionQueued(FullFlowContext flowContext)
Informs filter that proxy to server connection is in queue.
|
void |
proxyToServerConnectionSSLHandshakeStarted(FullFlowContext flowContext)
Informs filter that proxy to server ssl handshake is initiating.
|
void |
proxyToServerConnectionStarted(FullFlowContext flowContext)
Informs filter that proxy to server connection is initiating.
|
void |
proxyToServerConnectionSucceeded(FullFlowContext flowContext)
Informs filter that proxy to server connection has succeeded.
|
io.netty.handler.codec.http.HttpResponse |
proxyToServerRequest(io.netty.handler.codec.http.HttpObject httpObject)
Filters requests on their way from the proxy to the server.
|
void |
proxyToServerRequestSending(FullFlowContext flowContext,
io.netty.handler.codec.http.HttpRequest httpRequest) |
void |
proxyToServerRequestSent(FullFlowContext flowContext,
io.netty.handler.codec.http.LastHttpContent lastHttpContent) |
io.netty.handler.codec.http.HttpObject |
serverToProxyResponse(io.netty.handler.codec.http.HttpObject httpObject)
Filters responses on their way from the server to the proxy.
|
void |
serverToProxyResponseReceived(FullFlowContext flowContext)
Informs filter that server to proxy response has been received.
|
void |
serverToProxyResponseReceiving(FullFlowContext flowContext)
Informs filter that server to proxy response is being received.
|
void |
serverToProxyResponseTimedOut()
Informs filter that a timeout occurred before the server response was received by the client.
|
public static final HttpFiltersAdapter NOOP_FILTER
HttpFilters instance.protected final io.netty.handler.codec.http.HttpRequest originalRequest
protected final ChannelHandlerContext ctx
public HttpFiltersAdapter(io.netty.handler.codec.http.HttpRequest originalRequest,
ChannelHandlerContext ctx)
public HttpFiltersAdapter(io.netty.handler.codec.http.HttpRequest originalRequest)
public io.netty.handler.codec.http.HttpResponse clientToProxyRequest(io.netty.handler.codec.http.HttpObject httpObject)
HttpFiltersImportant: When returning a response, you must include a mechanism to allow the client to determine the length of the message (see RFC 7230, section 3.3.3: https://tools.ietf.org/html/rfc7230#section-3.3.3 ). For messages that may contain a body, you may do this by setting the Transfer-Encoding to chunked, setting an appropriate Content-Length, or by adding a "Connection: close" header to the response (which will instruct LittleProxy to close the connection). If the short-circuit response contains body content, it is recommended that you return a FullHttpResponse.
clientToProxyRequest 在接口中 HttpFiltershttpObject - Client to Proxy HttpRequest (and HttpContent, if chunked)public io.netty.handler.codec.http.HttpResponse proxyToServerRequest(io.netty.handler.codec.http.HttpObject httpObject)
HttpFiltersImportant: When returning a response, you must include a mechanism to allow the client to determine the length of the message (see RFC 7230, section 3.3.3: https://tools.ietf.org/html/rfc7230#section-3.3.3 ). For messages that may contain a body, you may do this by setting the Transfer-Encoding to chunked, setting an appropriate Content-Length, or by adding a "Connection: close" header to the response. (which will instruct LittleProxy to close the connection). If the short-circuit response contains body content, it is recommended that you return a FullHttpResponse.
proxyToServerRequest 在接口中 HttpFiltershttpObject - Proxy to Server HttpRequest (and HttpContent, if chunked)public void proxyToServerRequestSending(FullFlowContext flowContext, io.netty.handler.codec.http.HttpRequest httpRequest)
proxyToServerRequestSending 在接口中 HttpFiltersflowContext - provides contextual information about the flowhttpRequest - Informs filter that proxy to server request is being sent.public void proxyToServerRequestSent(FullFlowContext flowContext, io.netty.handler.codec.http.LastHttpContent lastHttpContent)
proxyToServerRequestSent 在接口中 HttpFiltersflowContext - the ChannelHandlerContext used to connect to the serverlastHttpContent - Informs filter that the HTTP request, including any content, has been sent.public io.netty.handler.codec.http.HttpObject serverToProxyResponse(io.netty.handler.codec.http.HttpObject httpObject)
HttpFiltersserverToProxyResponse 在接口中 HttpFiltershttpObject - Server to Proxy HttpResponse (and HttpContent, if chunked)public void serverToProxyResponseTimedOut()
HttpFiltersHttpProxyManagerBootstrap.withIdleConnectionTimeout(int) for information on setting the timeout.serverToProxyResponseTimedOut 在接口中 HttpFilterspublic void serverToProxyResponseReceiving(FullFlowContext flowContext)
HttpFiltersserverToProxyResponseReceiving 在接口中 HttpFiltersflowContext - the ChannelHandlerContext used to connect to the serverpublic void serverToProxyResponseReceived(FullFlowContext flowContext)
HttpFiltersserverToProxyResponseReceived 在接口中 HttpFiltersflowContext - the ChannelHandlerContext used to connect to the serverpublic io.netty.handler.codec.http.HttpObject proxyToClientResponse(io.netty.handler.codec.http.HttpObject httpObject)
HttpFiltersproxyToClientResponse 在接口中 HttpFiltershttpObject - Proxy to Client HttpResponse (and HttpContent, if chunked)public void proxyToServerConnectionQueued(FullFlowContext flowContext)
HttpFiltersproxyToServerConnectionQueued 在接口中 HttpFiltersflowContext - the ChannelHandlerContext used to connect to the serverpublic void proxyToServerConnectionStarted(FullFlowContext flowContext)
HttpFiltersproxyToServerConnectionStarted 在接口中 HttpFiltersflowContext - the ChannelHandlerContext used to connect to the serverpublic void proxyToServerConnectionSSLHandshakeStarted(FullFlowContext flowContext)
HttpFiltersproxyToServerConnectionSSLHandshakeStarted 在接口中 HttpFiltersflowContext - the ChannelHandlerContext used to connect to the serverpublic void proxyToServerConnectionFailed(FullFlowContext flowContext)
HttpFiltersproxyToServerConnectionFailed 在接口中 HttpFiltersflowContext - the ChannelHandlerContext used to connect to the serverpublic void proxyToServerConnectionSucceeded(FullFlowContext flowContext)
HttpFiltersproxyToServerConnectionSucceeded 在接口中 HttpFiltersflowContext - the ChannelHandlerContext used to connect to the serverCopyright © 2021 Zodiac. All rights reserved.