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.
 int getMaxResponseSize()
          Returns the maximum response size to expect in bytes for this filter.
 boolean shouldFilterResponses(org.jboss.netty.handler.codec.http.HttpRequest httpRequest)
          Returns whether or not to filter responses received from the specified HTTP request.
 
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

shouldFilterResponses

public boolean shouldFilterResponses(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:
shouldFilterResponses 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
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-2012 LittleShoot. All Rights Reserved.