1 18 package org.apache.activemq.command; 19 20 import org.apache.activemq.state.CommandVisitor; 21 22 29 public class MessagePull extends BaseCommand { 30 31 public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_PULL; 32 33 protected ConsumerId consumerId; 34 protected ActiveMQDestination destination; 35 protected long timeout; 36 private MessageId messageId; 37 private String correlationId; 38 39 public byte getDataStructureType() { 40 return DATA_STRUCTURE_TYPE; 41 } 42 43 public Response visit(CommandVisitor visitor) throws Exception { 44 return visitor.processMessagePull(this); 45 } 46 47 50 public void configure(ConsumerInfo info) { 51 setConsumerId(info.getConsumerId()); 52 setDestination(info.getDestination()); 53 } 54 55 58 public ConsumerId getConsumerId() { 59 return consumerId; 60 } 61 62 public void setConsumerId(ConsumerId consumerId) { 63 this.consumerId = consumerId; 64 } 65 66 69 public ActiveMQDestination getDestination() { 70 return destination; 71 } 72 73 public void setDestination(ActiveMQDestination destination) { 74 this.destination = destination; 75 } 76 77 80 public long getTimeout() { 81 return timeout; 82 } 83 84 public void setTimeout(long timeout) { 85 this.timeout = timeout; 86 } 87 88 94 public String getCorrelationId() { 95 return correlationId; 96 } 97 98 public void setCorrelationId(String correlationId) { 99 this.correlationId = correlationId; 100 } 101 102 103 109 public MessageId getMessageId() { 110 return messageId; 111 } 112 113 public void setMessageId(MessageId messageId) { 114 this.messageId = messageId; 115 } 116 } 117 | Popular Tags |