Package com.browserup.bup.filters
Class ResponseFilterAdapter.FilterSource
- java.lang.Object
-
- org.littleshoot.proxy.HttpFiltersSourceAdapter
-
- com.browserup.bup.filters.ResponseFilterAdapter.FilterSource
-
- All Implemented Interfaces:
org.littleshoot.proxy.HttpFiltersSource
- Enclosing class:
- ResponseFilterAdapter
public static class ResponseFilterAdapter.FilterSource extends org.littleshoot.proxy.HttpFiltersSourceAdapterAHttpFiltersSourceAdapterforResponseFilterAdapters. By default, this FilterSource enables HTTP message aggregation and sets a maximum response buffer size of 2 MiB.
-
-
Constructor Summary
Constructors Constructor Description FilterSource(ResponseFilter filter)Creates a new filter source that will invoke the specified filter and uses theDEFAULT_MAXIMUM_RESPONSE_BUFFER_SIZEas 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.
-
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)intgetMaximumResponseBufferSizeInBytes()
-
-
-
Constructor Detail
-
FilterSource
public FilterSource(ResponseFilter filter)
Creates a new filter source that will invoke the specified filter and uses theDEFAULT_MAXIMUM_RESPONSE_BUFFER_SIZEas the maximum buffer size.- Parameters:
filter- ResponseFilter to invoke
-
FilterSource
public 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. Set maximumResponseBufferSizeInBytes 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.getMaximumResponseBufferSizeInBytes()for details.)- Parameters:
filter- ResponseFilter to invokemaximumResponseBufferSizeInBytes- maximum buffer size when aggregating responses 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
-
getMaximumResponseBufferSizeInBytes
public int getMaximumResponseBufferSizeInBytes()
- Specified by:
getMaximumResponseBufferSizeInBytesin interfaceorg.littleshoot.proxy.HttpFiltersSource- Overrides:
getMaximumResponseBufferSizeInBytesin classorg.littleshoot.proxy.HttpFiltersSourceAdapter
-
-