org.littleshoot.proxy
Class HttpFiltersSourceAdapter

java.lang.Object
  extended by org.littleshoot.proxy.HttpFiltersSourceAdapter
All Implemented Interfaces:
HttpFiltersSource

public class HttpFiltersSourceAdapter
extends Object
implements HttpFiltersSource

Convenience base class for implementations of HttpFiltersSource.


Constructor Summary
HttpFiltersSourceAdapter()
           
 
Method Summary
 HttpFilters filterRequest(io.netty.handler.codec.http.HttpRequest originalRequest)
           
 HttpFilters filterRequest(io.netty.handler.codec.http.HttpRequest originalRequest, io.netty.channel.ChannelHandlerContext ctx)
          Return an HttpFilters object for this request if and only if we want to filter the request and/or its responses.
 int getMaximumRequestBufferSizeInBytes()
          Indicate how many (if any) bytes to buffer for incoming HttpRequests.
 int getMaximumResponseBufferSizeInBytes()
          Indicate how many (if any) bytes to buffer for incoming HttpResponses.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpFiltersSourceAdapter

public HttpFiltersSourceAdapter()
Method Detail

filterRequest

public HttpFilters filterRequest(io.netty.handler.codec.http.HttpRequest originalRequest)

filterRequest

public HttpFilters filterRequest(io.netty.handler.codec.http.HttpRequest originalRequest,
                                 io.netty.channel.ChannelHandlerContext ctx)
Description copied from interface: HttpFiltersSource
Return an HttpFilters object for this request if and only if we want to filter the request and/or its responses.

Specified by:
filterRequest in interface HttpFiltersSource
Returns:

getMaximumRequestBufferSizeInBytes

public int getMaximumRequestBufferSizeInBytes()
Description copied from interface: HttpFiltersSource
Indicate how many (if any) bytes to buffer for incoming HttpRequests. A value of 0 or less indicates that no buffering should happen and that messages will be passed to the HttpFilters request filtering methods chunk by chunk. A positive value will cause LittleProxy to try an create a FullHttpRequest using 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:
getMaximumRequestBufferSizeInBytes in interface HttpFiltersSource
Returns:

getMaximumResponseBufferSizeInBytes

public int getMaximumResponseBufferSizeInBytes()
Description copied from interface: HttpFiltersSource
Indicate how many (if any) bytes to buffer for incoming HttpResponses. A value of 0 or less indicates that no buffering should happen and that messages will be passed to the HttpFilters response filtering methods chunk by chunk. A positive value will cause LittleProxy to try an create a FullHttpResponse using 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:
getMaximumResponseBufferSizeInBytes in interface HttpFiltersSource
Returns:


Copyright © 2009-2014 LittleShoot. All Rights Reserved.