1
2 /**
3 IMPORTANT !!!
4
5 DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands BY
6 THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
7
8 IMPORTANT END !!!
9 */
10 package
11 cz.cuni.amis.pogamut.udk.communication.messages.gbcommands;
12 import java.util.*;
13 import javax.vecmath.*;
14 import cz.cuni.amis.pogamut.base.communication.messages.*;
15 import cz.cuni.amis.pogamut.base.communication.worldview.*;
16 import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17 import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18 import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19 import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20 import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22 import cz.cuni.amis.pogamut.udk.communication.messages.*;
23 import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24 import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25 import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26 import cz.cuni.amis.utils.exception.*;
27 import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28 import cz.cuni.amis.utils.SafeEquals;
29 import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30
31
32 /**
33
34 Will disable new connections to bot server and or control server
35 - depends on parameters. If last ControlServer instance is
36 leaving. ControlServer lock will be canceled.
37
38 Corresponding GameBots command is
39 SETLOCK.
40
41 */
42
43 public class
44 SetLock extends
45 CommandMessage
46
47 {
48
49 /**
50 Creates new instance of command SetLock.
51
52 Will disable new connections to bot server and or control server
53 - depends on parameters. If last ControlServer instance is
54 leaving. ControlServer lock will be canceled.
55 Corresponding GameBots message for this command is
56 SETLOCK.
57 @param BotServer
58 If BotConnections should be locked.
59
60 @param ControlServer
61 If ControlConnections (server connections) should be locked.
62
63 */
64 public SetLock(
65 boolean BotServer, boolean ControlServer) {
66
67 this.BotServer = BotServer;
68
69 this.ControlServer = ControlServer;
70
71 }
72
73
74 /**
75 Creates new instance of command SetLock.
76
77 Will disable new connections to bot server and or control server
78 - depends on parameters. If last ControlServer instance is
79 leaving. ControlServer lock will be canceled.
80 Corresponding GameBots message for this command is
81 SETLOCK.
82 <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
83 */
84 public SetLock() {
85 }
86
87
88 /////// Properties BEGIN
89
90 /**
91
92 If BotConnections should be locked.
93 */
94 protected
95 boolean BotServer =
96 false;
97
98
99 /**
100
101 If BotConnections should be locked.
102 */
103 public
104 boolean isBotServer() {
105 return
106 BotServer;
107 }
108
109
110
111 /**
112
113 If BotConnections should be locked.
114 */
115 public SetLock setBotServer(boolean BotServer) {
116 this.BotServer = BotServer;
117 return this;
118 }
119
120 /**
121
122 If ControlConnections (server connections) should be locked.
123 */
124 protected
125 boolean ControlServer =
126 false;
127
128
129 /**
130
131 If ControlConnections (server connections) should be locked.
132 */
133 public
134 boolean isControlServer() {
135 return
136 ControlServer;
137 }
138
139
140
141 /**
142
143 If ControlConnections (server connections) should be locked.
144 */
145 public SetLock setControlServer(boolean ControlServer) {
146 this.ControlServer = ControlServer;
147 return this;
148 }
149
150 /////// Properties END
151
152 /////// Extra Java code BEGIN
153
154 /////// Additional code from xslt BEGIN
155
156
157
158 /////// Additional code from xslt END
159
160 /////// Extra Java from XML BEGIN
161
162 /////// Extra Java from XML END
163
164 /////// Extra Java code END
165
166
167
168 /**
169 * Cloning constructor.
170 */
171 public SetLock(SetLock original) {
172
173 this.BotServer=original.BotServer;
174
175 this.ControlServer=original.ControlServer;
176
177 }
178
179
180
181
182 public String toString() {
183 return
184
185 toMessage();
186
187 }
188
189 public String toHtmlString() {
190 return super.toString() +
191
192 "<b>BotServer</b> : " +
193 String.valueOf(BotServer) +
194 " <br/> " +
195
196 "<b>ControlServer</b> : " +
197 String.valueOf(ControlServer) +
198 " <br/> " +
199 "";
200 }
201
202
203
204 public String toMessage() {
205 StringBuffer buf = new StringBuffer();
206 buf.append("SETLOCK");
207
208 buf.append(" {BotServer " + BotServer + "}");
209
210 buf.append(" {ControlServer " + ControlServer + "}");
211
212 return buf.toString();
213 }
214
215 }
216
217