KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Used to start and stop transports as well as terminating clients.
23  *
24  * @openwire:marshaller code="18"
25  *
26  * @version $Revision: 1.1 $
27  */

28 public class ConnectionControl extends BaseCommand{
29     public static final byte DATA_STRUCTURE_TYPE=CommandTypes.CONNECTION_CONTROL;
30     protected boolean suspend;
31     protected boolean resume;
32     protected boolean close;
33     protected boolean exit;
34     protected boolean faultTolerant;
35
36     public byte getDataStructureType(){
37         return DATA_STRUCTURE_TYPE;
38     }
39
40     public Response visit(CommandVisitor visitor) throws Exception JavaDoc{
41         return visitor.processConnectionControl(this);
42     }
43
44     /**
45      * @openwire:property version=1
46      * @return Returns the close.
47      */

48     public boolean isClose(){
49         return close;
50     }
51
52     /**
53      * @param close
54      * The close to set.
55      */

56     public void setClose(boolean close){
57         this.close=close;
58     }
59
60     /**
61      * @openwire:property version=1
62      * @return Returns the exit.
63      */

64     public boolean isExit(){
65         return exit;
66     }
67
68     /**
69      * @param exit
70      * The exit to set.
71      */

72     public void setExit(boolean exit){
73         this.exit=exit;
74     }
75
76     /**
77      * @openwire:property version=1
78      * @return Returns the faultTolerant.
79      */

80     public boolean isFaultTolerant(){
81         return faultTolerant;
82     }
83
84     /**
85      * @param faultTolerant
86      * The faultTolerant to set.
87      */

88     public void setFaultTolerant(boolean faultTolerant){
89         this.faultTolerant=faultTolerant;
90     }
91
92     /**
93      * @openwire:property version=1
94      * @return Returns the resume.
95      */

96     public boolean isResume(){
97         return resume;
98     }
99
100     /**
101      * @param resume
102      * The resume to set.
103      */

104     public void setResume(boolean resume){
105         this.resume=resume;
106     }
107
108     /**
109      * @openwire:property version=1
110      * @return Returns the suspend.
111      */

112     public boolean isSuspend(){
113         return suspend;
114     }
115
116     /**
117      * @param suspend
118      * The suspend to set.
119      */

120     public void setSuspend(boolean suspend){
121         this.suspend=suspend;
122     }
123 }
124
Popular Tags