KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > command > ConsumerControl


1 /**
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.apache.activemq.command;
19
20 import org.apache.activemq.state.CommandVisitor;
21
22 /**
23  * Used to start and stop transports as well as terminating clients.
24  *
25  * @openwire:marshaller code="17"
26  *
27  * @version $Revision: 1.1 $
28  */

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 JavaDoc {
45         return visitor.processConsumerControl(this);
46     }
47
48     /**
49      * @openwire:property version=1
50      * @return Returns the close.
51      */

52     public boolean isClose(){
53         return close;
54     }
55
56
57
58
59
60     /**
61      * @param close The close to set.
62      */

63     public void setClose(boolean close){
64         this.close=close;
65     }
66
67
68
69
70
71     /**
72      * @openwire:property version=1
73      * @return Returns the consumerId.
74      */

75     public ConsumerId getConsumerId(){
76         return consumerId;
77     }
78
79
80
81
82
83     /**
84      * @param consumerId The consumerId to set.
85      */

86     public void setConsumerId(ConsumerId consumerId){
87         this.consumerId=consumerId;
88     }
89
90
91
92
93
94     /**
95      * @openwire:property version=1
96      * @return Returns the prefetch.
97      */

98     public int getPrefetch(){
99         return prefetch;
100     }
101
102
103
104
105
106     /**
107      * @param prefetch The prefetch to set.
108      */

109     public void setPrefetch(int prefetch){
110         this.prefetch=prefetch;
111     }
112
113
114
115
116
117     
118     /**
119      * @openwire:property version=2
120      * @return the flush
121      */

122     public boolean isFlush(){
123         return this.flush;
124     }
125
126
127
128
129
130     
131     /**
132      * @param flush the flush to set
133      */

134     public void setFlush(boolean flush){
135         this.flush=flush;
136     }
137
138
139
140
141
142     
143     /**
144      * @openwire:property version=2
145      * @return the start
146      */

147     public boolean isStart(){
148         return this.start;
149     }
150
151
152
153
154
155     
156     /**
157      * @param start the start to set
158      */

159     public void setStart(boolean start){
160         this.start=start;
161     }
162
163
164
165
166
167     
168     /**
169      * @openwire:property version=2
170      * @return the stop
171      */

172     public boolean isStop(){
173         return this.stop;
174     }
175
176
177
178
179
180     
181     /**
182      * @param stop the stop to set
183      */

184     public void setStop(boolean stop){
185         this.stop=stop;
186     }
187 }
188
Popular Tags