org.apache.qpid.sustained
Class SustainedClientTestCase.SustainedListener

java.lang.Object
  extended by org.apache.qpid.sustained.SustainedClientTestCase.SustainedListener
All Implemented Interfaces:
MessageListener
Enclosing class:
SustainedClientTestCase

 class SustainedClientTestCase.SustainedListener
extends Object
implements MessageListener

Inner class that listens for messages and sends a report for the time taken between receiving the 'start' and 'end' messages.


Field Summary
(package private)  String _client
          Record of the client ID used for this SustainedListnener
(package private)  Session _session
          Session to create the report message on
(package private)  MessageProducer _updater
          Message producer to use to send reports
 
Constructor Summary
SustainedClientTestCase.SustainedListener(String clientname, int batchSize, Session session, Destination sendDestination)
          Main Constructor
 
Method Summary
 void onMessage(Message message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_updater

MessageProducer _updater
Message producer to use to send reports


_session

Session _session
Session to create the report message on


_client

String _client
Record of the client ID used for this SustainedListnener

Constructor Detail

SustainedClientTestCase.SustainedListener

public SustainedClientTestCase.SustainedListener(String clientname,
                                                 int batchSize,
                                                 Session session,
                                                 Destination sendDestination)
                                          throws JMSException
Main Constructor

Parameters:
clientname - The _client id used to identify this connection.
batchSize - The number of messages that are to be sent per batch. Note: This is not used to control the interval between sending reports.
session - The controlSession used for communication.
sendDestination - The destination that update reports should be sent to.
Throws:
JMSException - My occur if creatingthe Producer fails
Method Detail

onMessage

public void onMessage(Message message)
Specified by:
onMessage in interface MessageListener


Licensed to the Apache Software Foundation