1 18 package org.apache.activemq.advisory; 19 20 import org.apache.activemq.command.ProducerId; 21 22 import javax.jms.Destination ; 23 24 import java.util.EventObject ; 25 26 31 public abstract class ProducerEvent extends EventObject { 32 private static final long serialVersionUID = 2442156576867593780L; 33 private final Destination destination; 34 private final ProducerId producerId; 35 private final int producerCount; 36 37 public ProducerEvent(ProducerEventSource source, Destination destination, ProducerId producerId, int producerCount) { 38 super(source); 39 this.destination = destination; 40 this.producerId = producerId; 41 this.producerCount = producerCount; 42 } 43 44 public ProducerEventSource getAdvisor() { 45 return (ProducerEventSource) getSource(); 46 } 47 48 public Destination getDestination() { 49 return destination; 50 } 51 52 56 public int getProducerCount() { 57 return producerCount; 58 } 59 60 public ProducerId getProducerId() { 61 return producerId; 62 } 63 64 public abstract boolean isStarted(); 65 } 66 | Popular Tags |