1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 public class HelloBotHandshake
29 extends InfoMessage
30 implements IWorldEvent, IWorldChangeEvent
31
32 {
33
34
35 public static final String PROTOTYPE =
36 "HELLO_BOT {ServerFull False} {Game text} {Version text} ";
37
38
39
40
41
42
43 public HelloBotHandshake()
44 {
45 }
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81 public HelloBotHandshake(
82 boolean ServerFull, String Game, String Version
83 ) {
84
85 this.ServerFull = ServerFull;
86
87 this.Game = Game;
88
89 this.Version = Version;
90
91 }
92
93
94
95
96
97
98 public HelloBotHandshake(HelloBotHandshake original) {
99
100 this.ServerFull = original.isServerFull()
101 ;
102
103 this.Game = original.getGame()
104 ;
105
106 this.Version = original.getVersion()
107 ;
108
109 this.SimTime = original.getSimTime();
110 }
111
112
113 protected long SimTime;
114
115
116
117
118 @Override
119 public long getSimTime() {
120 return SimTime;
121 }
122
123
124
125
126 protected void setSimTime(long SimTime) {
127 this.SimTime = SimTime;
128 }
129
130
131
132
133
134
135
136 protected
137 boolean ServerFull =
138 false;
139
140
141
142
143
144
145 public boolean isServerFull()
146 {
147 return ServerFull;
148 }
149
150
151
152
153
154
155
156 protected
157 String Game =
158 null;
159
160
161
162
163
164
165 public String getGame()
166 {
167 return Game;
168 }
169
170
171
172
173
174
175
176 protected
177 String Version =
178 null;
179
180
181
182
183
184
185 public String getVersion()
186 {
187 return Version;
188 }
189
190
191 public String toString() {
192 return
193 super.toString() + "[" +
194
195 "ServerFull = " + String.valueOf(isServerFull()
196 ) + " | " +
197
198 "Game = " + String.valueOf(getGame()
199 ) + " | " +
200
201 "Version = " + String.valueOf(getVersion()
202 ) + " | " +
203
204 "]";
205 }
206
207
208 public String toHtmlString() {
209 return super.toString() + "[<br/>" +
210
211 "<b>ServerFull</b> = " + String.valueOf(isServerFull()
212 ) + " <br/> " +
213
214 "<b>Game</b> = " + String.valueOf(getGame()
215 ) + " <br/> " +
216
217 "<b>Version</b> = " + String.valueOf(getVersion()
218 ) + " <br/> " +
219
220 "<br/>]";
221 }
222
223 public String toJsonLiteral() {
224 return "hellobothandshake( "
225 +
226 String.valueOf(isServerFull()
227 )
228 + ", " +
229 (getGame()
230 == null ? "null" :
231 "\"" + getGame()
232 + "\""
233 )
234 + ", " +
235 (getVersion()
236 == null ? "null" :
237 "\"" + getVersion()
238 + "\""
239 )
240
241 + ")";
242 }
243
244
245
246
247
248
249
250
251
252
253 }
254