com.ning.http.client.filter
Class ThrottleRequestAsyncFilter

java.lang.Object
  extended by com.ning.http.client.filter.ThrottleRequestAsyncFilter
All Implemented Interfaces:
AsyncFilter

public class ThrottleRequestAsyncFilter
extends Object
implements AsyncFilter

This AsyncFilter throttles requests and block when the number of permits is reached, waiting for the response to arrives before executing the next request.


Constructor Summary
ThrottleRequestAsyncFilter(int maxConnections)
           
ThrottleRequestAsyncFilter(int maxConnections, int maxWait)
           
 
Method Summary
 AsyncFilterContext filter(AsyncFilterContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrottleRequestAsyncFilter

public ThrottleRequestAsyncFilter(int maxConnections)

ThrottleRequestAsyncFilter

public ThrottleRequestAsyncFilter(int maxConnections,
                                  int maxWait)
Method Detail

filter

public AsyncFilterContext filter(AsyncFilterContext ctx)
                          throws AsyncFilterException
Specified by:
filter in interface AsyncFilter
Throws:
AsyncFilterException


Copyright © 2010. All Rights Reserved.