1 18 package org.apache.activemq.command; 19 20 import org.apache.activemq.state.CommandVisitor; 21 22 23 31 public class ProducerAck extends BaseCommand { 32 33 public static final byte DATA_STRUCTURE_TYPE=CommandTypes.PRODUCER_ACK; 34 35 protected ProducerId producerId; 36 protected int size; 37 38 public ProducerAck() { 39 } 40 41 public ProducerAck(ProducerId producerId, int size) { 42 this.producerId = producerId; 43 this.size = size; 44 } 45 46 public void copy(ProducerAck copy) { 47 super.copy(copy); 48 copy.producerId = producerId; 49 copy.size = size; 50 } 51 52 public byte getDataStructureType() { 53 return DATA_STRUCTURE_TYPE; 54 } 55 56 public Response visit(CommandVisitor visitor) throws Exception { 57 return visitor.processProducerAck( this ); 58 } 59 60 65 public ProducerId getProducerId() { 66 return producerId; 67 } 68 69 public void setProducerId(ProducerId producerId) { 70 this.producerId = producerId; 71 } 72 73 78 public int getSize() { 79 return size; 80 } 81 82 public void setSize(int size) { 83 this.size = size; 84 } 85 86 87 } 88 | Popular Tags |