public static class RequestFilterAdapter.FilterSource
extends org.littleshoot.proxy.HttpFiltersSourceAdapter
HttpFiltersSourceAdapter
for RequestFilterAdapter
s. By default, this FilterSource enables HTTP message aggregation
and sets a maximum request buffer size of 2 MiB.Constructor and Description |
---|
FilterSource(RequestFilter filter)
Creates a new filter source that will invoke the specified filter and uses the
DEFAULT_MAXIMUM_REQUEST_BUFFER_SIZE as
the maximum buffer size. |
FilterSource(RequestFilter filter,
int maximumRequestBufferSizeInBytes)
Creates a new filter source that will invoke the specified filter and uses the maximumRequestBufferSizeInBytes 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 |
getMaximumRequestBufferSizeInBytes() |
public FilterSource(RequestFilter filter)
DEFAULT_MAXIMUM_REQUEST_BUFFER_SIZE
as
the maximum buffer size.filter
- RequestFilter to invokepublic FilterSource(RequestFilter filter, int maximumRequestBufferSizeInBytes)
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.getMaximumRequestBufferSizeInBytes()
for details.)filter
- RequestFilter to invokemaximumRequestBufferSizeInBytes
- maximum buffer size when aggregating Requests 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.HttpFiltersSource
filterRequest
in class org.littleshoot.proxy.HttpFiltersSourceAdapter
public int getMaximumRequestBufferSizeInBytes()
getMaximumRequestBufferSizeInBytes
in interface org.littleshoot.proxy.HttpFiltersSource
getMaximumRequestBufferSizeInBytes
in class org.littleshoot.proxy.HttpFiltersSourceAdapter
Copyright © 2017. All rights reserved.