org.apache.activemq.advisory
Class ProducerEventSource
java.lang.Object
org.apache.activemq.advisory.ProducerEventSource
- All Implemented Interfaces:
- MessageListener, Service
public class ProducerEventSource
- extends Object
- implements Service, MessageListener
An object which can be used to listen to the number of active consumers
available on a given destination.
- Version:
- $Revision: 359679 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProducerEventSource
public ProducerEventSource(Connection connection,
Destination destination)
throws JMSException
- Throws:
JMSException
setProducerListener
public void setProducerListener(ProducerListener listener)
start
public void start()
throws Exception
- Specified by:
start
in interface Service
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop
in interface Service
- Throws:
Exception
onMessage
public void onMessage(Message message)
- Specified by:
onMessage
in interface MessageListener
extractProducerCountFromMessage
protected int extractProducerCountFromMessage(Message message,
int count)
fireProducerEvent
protected void fireProducerEvent(ProducerEvent event)
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.