org.apache.qpid.requestreply
Interface PingPongProducer.ChainedMessageListener

Enclosing class:
PingPongProducer

public static interface PingPongProducer.ChainedMessageListener

Defines a chained message listener interface that can be attached to this pinger. Whenever this pinger's PingPongProducer.onMessageWithConsumerNo(javax.jms.Message, int) method is called, the chained listener set through the PingPongProducer.setChainedMessageListener(org.apache.qpid.requestreply.PingPongProducer.ChainedMessageListener) method is passed the message, and the remaining expected count of messages with that correlation id.

Provided only one pinger is producing messages with that correlation id, the chained listener will always be given unique message counts. It will always be called while the producer waiting for all messages to arrive is still blocked.


Method Summary
 void onMessage(Message message, int remainingCount, long latency)
          Notifies interested listeners about message arrival and important test stats, the number of messages remaining in the test, and the messages send timestamp.
 

Method Detail

onMessage

void onMessage(Message message,
               int remainingCount,
               long latency)
               throws JMSException
Notifies interested listeners about message arrival and important test stats, the number of messages remaining in the test, and the messages send timestamp.

Parameters:
message - The newly arrived message.
remainingCount - The number of messages left to complete the test.
latency - The nanosecond latency of the message.
Throws:
JMSException - Any JMS exceptions is allowed to fall through.


Licensed to the Apache Software Foundation