Package com.browserup.bup.filters
Class RequestFilterAdapter.FilterSource
- java.lang.Object
-
- org.littleshoot.proxy.HttpFiltersSourceAdapter
-
- com.browserup.bup.filters.RequestFilterAdapter.FilterSource
-
- All Implemented Interfaces:
org.littleshoot.proxy.HttpFiltersSource
- Enclosing class:
- RequestFilterAdapter
public static class RequestFilterAdapter.FilterSource extends org.littleshoot.proxy.HttpFiltersSourceAdapterAHttpFiltersSourceAdapterforRequestFilterAdapters. By default, this FilterSource enables HTTP message aggregation and sets a maximum request buffer size of 2 MiB.
-
-
Constructor Summary
Constructors Constructor Description FilterSource(RequestFilter filter)Creates a new filter source that will invoke the specified filter and uses theDEFAULT_MAXIMUM_REQUEST_BUFFER_SIZEas 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.littleshoot.proxy.HttpFiltersfilterRequest(io.netty.handler.codec.http.HttpRequest originalRequest, io.netty.channel.ChannelHandlerContext ctx)intgetMaximumRequestBufferSizeInBytes()
-
-
-
Constructor Detail
-
FilterSource
public FilterSource(RequestFilter filter)
Creates a new filter source that will invoke the specified filter and uses theDEFAULT_MAXIMUM_REQUEST_BUFFER_SIZEas the maximum buffer size.- Parameters:
filter- RequestFilter to invoke
-
FilterSource
public 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. Set maximumRequestBufferSizeInBytes to 0 to disable aggregation. If message aggregation is disabled, theHttpMessageContentswill 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. SeeHttpFiltersSource.getMaximumRequestBufferSizeInBytes()for details.)- Parameters:
filter- RequestFilter to invokemaximumRequestBufferSizeInBytes- maximum buffer size when aggregating Requests for filtering
-
-
Method Detail
-
filterRequest
public org.littleshoot.proxy.HttpFilters filterRequest(io.netty.handler.codec.http.HttpRequest originalRequest, io.netty.channel.ChannelHandlerContext ctx)- Specified by:
filterRequestin interfaceorg.littleshoot.proxy.HttpFiltersSource- Overrides:
filterRequestin classorg.littleshoot.proxy.HttpFiltersSourceAdapter
-
getMaximumRequestBufferSizeInBytes
public int getMaximumRequestBufferSizeInBytes()
- Specified by:
getMaximumRequestBufferSizeInBytesin interfaceorg.littleshoot.proxy.HttpFiltersSource- Overrides:
getMaximumRequestBufferSizeInBytesin classorg.littleshoot.proxy.HttpFiltersSourceAdapter
-
-