org.mule.tck.functional
Class CounterCallback

java.lang.Object
  extended by org.mule.tck.functional.CounterCallback
All Implemented Interfaces:
EventCallback
Direct Known Subclasses:
ResponseWriterCallback

public class CounterCallback
extends Object
implements EventCallback

A test callback that counts the number of messages received.


Constructor Summary
CounterCallback()
           
CounterCallback(edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger callbackCount)
           
 
Method Summary
 void eventReceived(MuleEventContext context, Object Component)
           
 int getCallbackCount()
           
protected  int incCallbackCount()
          Increment callback count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CounterCallback

public CounterCallback()

CounterCallback

public CounterCallback(edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger callbackCount)
Method Detail

eventReceived

public void eventReceived(MuleEventContext context,
                          Object Component)
                   throws Exception
Specified by:
eventReceived in interface EventCallback
Throws:
Exception

incCallbackCount

protected int incCallbackCount()
Increment callback count.

Returns:
current count after increment

getCallbackCount

public int getCallbackCount()


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.