org.exolab.jmscts.stress
Class AckingListener

java.lang.Object
  |
  +--org.exolab.jmscts.core.CountingListener
        |
        +--org.exolab.jmscts.stress.AckingListener
All Implemented Interfaces:
javax.jms.MessageListener

public class AckingListener
extends CountingListener

Listener which counts and acks each message it receives

Version:
$Revision: 1.3 $ $Date: 2004/02/03 21:52:08 $
Author:
Tim Anderson
See Also:
CountingListener

Constructor Summary
AckingListener(int expected)
          Construct an instance of the listener, with the number of messages expected to be received.
 
Method Summary
 void onMessage(javax.jms.Message message)
          This method is asynchronously invoked by the message consumer when a message becomes available.
 
Methods inherited from class org.exolab.jmscts.core.CountingListener
getExpected, getReceived, waitForCompletion, waitForCompletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AckingListener

public AckingListener(int expected)
Construct an instance of the listener, with the number of messages expected to be received. When this count is reached, the listener notifies the waiting client (if any)
Parameters:
expected - the number of messages expected
Method Detail

onMessage

public void onMessage(javax.jms.Message message)
This method is asynchronously invoked by the message consumer when a message becomes available. If the number of expected messages are received, it notifies the waiting client (if any)
Overrides:
onMessage in class CountingListener
Parameters:
message - the received message


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.