rabbit.client
Class CountingClientBaseStopper

java.lang.Object
  extended by rabbit.client.CountingClientBaseStopper

public class CountingClientBaseStopper
extends Object

A helper class that shuts down the clientBase when all requests have finished.

Author:
Robert Olofsson

Constructor Summary
CountingClientBaseStopper(ClientBase clientBase)
          Create a new CountingClientBaseStopper that will shutdown the given client once all outstanding requests have been fully handled.
 
Method Summary
 void requestDone()
          Called when one request has finished
 void sendRequest(HttpHeader request, ClientListener listener)
          Send a request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingClientBaseStopper

public CountingClientBaseStopper(ClientBase clientBase)
Create a new CountingClientBaseStopper that will shutdown the given client once all outstanding requests have been fully handled.

Parameters:
clientBase - the actual client
Method Detail

sendRequest

public void sendRequest(HttpHeader request,
                        ClientListener listener)
Send a request

Parameters:
request - the http header to send
listener - the client handling the resource

requestDone

public void requestDone()
Called when one request has finished