Package org.littleshoot.proxy
Class HttpFiltersSourceAdapter
- java.lang.Object
-
- org.littleshoot.proxy.HttpFiltersSourceAdapter
-
- All Implemented Interfaces:
HttpFiltersSource
public class HttpFiltersSourceAdapter extends Object implements HttpFiltersSource
Convenience base class for implementations ofHttpFiltersSource.
-
-
Constructor Summary
Constructors Constructor Description HttpFiltersSourceAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpFiltersfilterRequest(HttpRequest originalRequest)HttpFiltersfilterRequest(HttpRequest originalRequest, ChannelHandlerContext ctx)Return anHttpFiltersobject for this request if and only if we want to filter the request and/or its responses.intgetMaximumRequestBufferSizeInBytes()Indicate how many (if any) bytes to buffer for incomingHttpRequests.intgetMaximumResponseBufferSizeInBytes()Indicate how many (if any) bytes to buffer for incomingHttpResponses.
-
-
-
Method Detail
-
filterRequest
public HttpFilters filterRequest(HttpRequest originalRequest)
-
filterRequest
public HttpFilters filterRequest(HttpRequest originalRequest, ChannelHandlerContext ctx)
Description copied from interface:HttpFiltersSourceReturn anHttpFiltersobject for this request if and only if we want to filter the request and/or its responses.- Specified by:
filterRequestin interfaceHttpFiltersSource
-
getMaximumRequestBufferSizeInBytes
public int getMaximumRequestBufferSizeInBytes()
Description copied from interface:HttpFiltersSourceIndicate how many (if any) bytes to buffer for incomingHttpRequests. A value of 0 or less indicates that no buffering should happen and that messages will be passed to theHttpFiltersrequest filtering methods chunk by chunk. A positive value will cause LittleProxy to try an create aFullHttpRequestusing the data received from the client, with its content already decompressed (in case the client was compressing it). If the request size exceeds the maximum buffer size, the request will fail.- Specified by:
getMaximumRequestBufferSizeInBytesin interfaceHttpFiltersSource
-
getMaximumResponseBufferSizeInBytes
public int getMaximumResponseBufferSizeInBytes()
Description copied from interface:HttpFiltersSourceIndicate how many (if any) bytes to buffer for incomingHttpResponses. A value of 0 or less indicates that no buffering should happen and that messages will be passed to theHttpFiltersresponse filtering methods chunk by chunk. A positive value will cause LittleProxy to try an create aFullHttpResponseusing the data received from the server, with its content already decompressed (in case the server was compressing it). If the response size exceeds the maximum buffer size, the response will fail.- Specified by:
getMaximumResponseBufferSizeInBytesin interfaceHttpFiltersSource
-
-