1 18 package org.apache.activemq.command; 19 20 import org.apache.activemq.state.CommandVisitor; 21 22 23 28 public class MessageDispatch extends BaseCommand { 29 30 public static final byte DATA_STRUCTURE_TYPE=CommandTypes.MESSAGE_DISPATCH; 31 32 protected ConsumerId consumerId; 33 protected ActiveMQDestination destination; 34 protected Message message; 35 protected int redeliveryCounter; 36 37 transient protected long deliverySequenceId; 38 transient protected Object consumer; 39 transient protected Runnable transmitCallback; 40 41 public byte getDataStructureType() { 42 return DATA_STRUCTURE_TYPE; 43 } 44 45 public boolean isMessageDispatch() { 46 return true; 47 } 48 49 52 public ConsumerId getConsumerId() { 53 return consumerId; 54 } 55 public void setConsumerId(ConsumerId consumerId) { 56 this.consumerId = consumerId; 57 } 58 59 62 public ActiveMQDestination getDestination() { 63 return destination; 64 } 65 public void setDestination(ActiveMQDestination destination) { 66 this.destination = destination; 67 } 68 69 72 public Message getMessage() { 73 return message; 74 } 75 public void setMessage(Message message) { 76 this.message = message; 77 } 78 79 public long getDeliverySequenceId() { 80 return deliverySequenceId; 81 } 82 public void setDeliverySequenceId(long deliverySequenceId) { 83 this.deliverySequenceId = deliverySequenceId; 84 } 85 86 89 public int getRedeliveryCounter() { 90 return redeliveryCounter; 91 } 92 public void setRedeliveryCounter(int deliveryCounter) { 93 this.redeliveryCounter = deliveryCounter; 94 } 95 96 public Object getConsumer() { 97 return consumer; 98 } 99 100 public void setConsumer(Object consumer) { 101 this.consumer = consumer; 102 } 103 104 public Response visit(CommandVisitor visitor) throws Exception { 105 return visitor.processMessageDispatch(this); 106 } 107 108 public Runnable getTransmitCallback() { 109 return transmitCallback; 110 } 111 112 public void setTransmitCallback(Runnable transmitCallback) { 113 this.transmitCallback = transmitCallback; 114 } 115 116 } 117 | Popular Tags |