- All Implemented Interfaces:
- Direct Known Subclasses:
- ConsumerStartedEvent, ConsumerStoppedEvent
public abstract class ConsumerEvent
- extends EventObject
An event when the number of consumers on a given destination changes.
- See Also:
- Serialized Form
public ConsumerEvent(ConsumerEventSource source,
public ConsumerEventSource getAdvisor()
public Destination getDestination()
public int getConsumerCount()
- Returns the current number of consumers active at the time this advisory was sent.
Note that this is not the number of consumers active when the consumer started consuming.
It is usually more vital to know how many consumers there are now - rather than historically
how many there were when a consumer started. So if you create a
after many consumers have started, you will receive a ConsumerEvent for each consumer. However the
getConsumerCount() method will always return the current active consumer count on each event.
public ConsumerId getConsumerId()
public abstract boolean isStarted()
Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.