1 18 package org.apache.activemq.command; 19 20 import org.apache.activemq.state.CommandVisitor; 21 22 29 public class ConsumerControl extends BaseCommand { 30 31 public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_CONTROL; 32 33 protected ConsumerId consumerId; 34 protected boolean close; 35 protected boolean stop; 36 protected boolean start; 37 protected boolean flush; 38 protected int prefetch; 39 public byte getDataStructureType() { 40 return DATA_STRUCTURE_TYPE; 41 } 42 43 44 public Response visit(CommandVisitor visitor) throws Exception { 45 return visitor.processConsumerControl(this); 46 } 47 48 52 public boolean isClose(){ 53 return close; 54 } 55 56 57 58 59 60 63 public void setClose(boolean close){ 64 this.close=close; 65 } 66 67 68 69 70 71 75 public ConsumerId getConsumerId(){ 76 return consumerId; 77 } 78 79 80 81 82 83 86 public void setConsumerId(ConsumerId consumerId){ 87 this.consumerId=consumerId; 88 } 89 90 91 92 93 94 98 public int getPrefetch(){ 99 return prefetch; 100 } 101 102 103 104 105 106 109 public void setPrefetch(int prefetch){ 110 this.prefetch=prefetch; 111 } 112 113 114 115 116 117 118 122 public boolean isFlush(){ 123 return this.flush; 124 } 125 126 127 128 129 130 131 134 public void setFlush(boolean flush){ 135 this.flush=flush; 136 } 137 138 139 140 141 142 143 147 public boolean isStart(){ 148 return this.start; 149 } 150 151 152 153 154 155 156 159 public void setStart(boolean start){ 160 this.start=start; 161 } 162 163 164 165 166 167 168 172 public boolean isStop(){ 173 return this.stop; 174 } 175 176 177 178 179 180 181 184 public void setStop(boolean stop){ 185 this.stop=stop; 186 } 187 } 188 | Popular Tags |