CountingMessageListenerFactory.java
This file contains definitions for two classes:
- CountingMessageListener
- CountingMessageListenerFactory
CountingMessageListener is a very simple implementation of the javax.jms.MessageListener interface. It keeps a record of the number of times its onMessage method has been invoked, but does nothing with the messages it is passed.
CountingMessageListenerFactory is the factory class for CountingMessageListener. It is an implementation of the MessageListenerFactory interface described in MessageListenerFactory.java. This factory keeps a record of all the message listeners that it produces. It also includes a method, printStats(), which displays usage statistics for each of these listeners.
uj25700_