org.littleshoot.proxy
Class NoOpHttpFilter

java.lang.Object
  extended by org.littleshoot.proxy.NoOpHttpFilter
All Implemented Interfaces:
HttpFilter, HttpRequestMatcher

public class NoOpHttpFilter
extends Object
implements HttpFilter

HTTP filter that does nothing.


Constructor Summary
NoOpHttpFilter()
           
 
Method Summary
 org.jboss.netty.handler.codec.http.HttpResponse filterResponse(org.jboss.netty.handler.codec.http.HttpRequest httpRequest, org.jboss.netty.handler.codec.http.HttpResponse response)
          Filters the HTTP response.
 boolean filterResponses(org.jboss.netty.handler.codec.http.HttpRequest httpRequest)
          Returns whether or not to filter responses received from the specified HTTP request.
 int getMaxResponseSize()
          Returns the maximum response size to expect in bytes for this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoOpHttpFilter

public NoOpHttpFilter()
Method Detail

filterResponses

public boolean filterResponses(org.jboss.netty.handler.codec.http.HttpRequest httpRequest)
Description copied from interface: HttpRequestMatcher
Returns whether or not to filter responses received from the specified HTTP request.

Specified by:
filterResponses in interface HttpRequestMatcher
Parameters:
httpRequest - The request to check.
Returns:
true if we should apply this set of rules, otherwise false.

filterResponse

public org.jboss.netty.handler.codec.http.HttpResponse filterResponse(org.jboss.netty.handler.codec.http.HttpRequest httpRequest,
                                                                      org.jboss.netty.handler.codec.http.HttpResponse response)
Description copied from interface: HttpFilter
Filters the HTTP response.

Specified by:
filterResponse in interface HttpFilter
Parameters:
httpRequest - The HTTP request associated with the response.
response - The response to filter.
Returns:
The filtered response.

getMaxResponseSize

public int getMaxResponseSize()
Description copied from interface: HttpFilter
Returns the maximum response size to expect in bytes for this filter. You should set this as small as possible to save memory, but of course not smaller than response body sizes will be.

Specified by:
getMaxResponseSize in interface HttpFilter
Returns:
The maximum response body size to support for this filter, in bytes.


Copyright © 2009-2013 LittleShoot. All Rights Reserved.