public static class ResponseFilterAdapter.FilterSource
extends org.littleshoot.proxy.HttpFiltersSourceAdapter
HttpFiltersSourceAdapter for ResponseFilterAdapters. By default, this FilterSource enables HTTP message aggregation
and sets a maximum response buffer size of 2 MiB.| Constructor and Description |
|---|
FilterSource(ResponseFilter filter)
Creates a new filter source that will invoke the specified filter and uses the
DEFAULT_MAXIMUM_RESPONSE_BUFFER_SIZE as
the maximum buffer size. |
FilterSource(ResponseFilter filter,
int maximumResponseBufferSizeInBytes)
Creates a new filter source that will invoke the specified filter and uses the maximumResponseBufferSizeInBytes as the maximum
buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
org.littleshoot.proxy.HttpFilters |
filterRequest(io.netty.handler.codec.http.HttpRequest originalRequest,
io.netty.channel.ChannelHandlerContext ctx) |
int |
getMaximumResponseBufferSizeInBytes() |
public FilterSource(ResponseFilter filter)
DEFAULT_MAXIMUM_RESPONSE_BUFFER_SIZE as
the maximum buffer size.filter - ResponseFilter to invokepublic FilterSource(ResponseFilter filter, int maximumResponseBufferSizeInBytes)
HttpMessageContents will not be available for modification. (Note: HTTP message aggregation will
be enabled if any filter has a maximum request or response buffer size greater than 0. See
HttpFiltersSource.getMaximumResponseBufferSizeInBytes() for details.)filter - ResponseFilter to invokemaximumResponseBufferSizeInBytes - maximum buffer size when aggregating responses for filteringpublic org.littleshoot.proxy.HttpFilters filterRequest(io.netty.handler.codec.http.HttpRequest originalRequest,
io.netty.channel.ChannelHandlerContext ctx)
filterRequest in interface org.littleshoot.proxy.HttpFiltersSourcefilterRequest in class org.littleshoot.proxy.HttpFiltersSourceAdapterpublic int getMaximumResponseBufferSizeInBytes()
getMaximumResponseBufferSizeInBytes in interface org.littleshoot.proxy.HttpFiltersSourcegetMaximumResponseBufferSizeInBytes in class org.littleshoot.proxy.HttpFiltersSourceAdapterCopyright © 2016. All rights reserved.