1 18 package org.apache.activemq.advisory; 19 20 import org.apache.activemq.command.ConsumerId; 21 22 import javax.jms.Destination ; 23 24 import java.util.EventObject ; 25 26 31 public abstract class ConsumerEvent extends EventObject { 32 private static final long serialVersionUID = 2442156576867593780L; 33 private final Destination destination; 34 private final ConsumerId consumerId; 35 private final int consumerCount; 36 37 public ConsumerEvent(ConsumerEventSource source, Destination destination, ConsumerId consumerId, int consumerCount) { 38 super(source); 39 this.destination = destination; 40 this.consumerId = consumerId; 41 this.consumerCount = consumerCount; 42 } 43 44 public ConsumerEventSource getAdvisor() { 45 return (ConsumerEventSource) getSource(); 46 } 47 48 public Destination getDestination() { 49 return destination; 50 } 51 52 61 public int getConsumerCount() { 62 return consumerCount; 63 } 64 65 public ConsumerId getConsumerId() { 66 return consumerId; 67 } 68 69 public abstract boolean isStarted(); 70 } 71 | Popular Tags |