blob: f4e8ae512734dbf2253f92b2bde0f2387ca0eed2 [file] [log] [blame]
Umesh Krishnaswamy9b5c59e2012-12-27 19:39:51 -08001/**
2 * Autogenerated by Thrift Compiler (0.7.0)
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 */
6package net.floodlightcontroller.packetstreamer.thrift;
7
8import java.util.List;
9import java.util.ArrayList;
10import java.util.Map;
11import java.util.HashMap;
12import java.util.EnumMap;
13import java.util.Set;
14import java.util.HashSet;
15import java.util.EnumSet;
16import java.util.Collections;
17import java.util.BitSet;
18import java.nio.ByteBuffer;
19import java.util.Arrays;
20import org.slf4j.Logger;
21import org.slf4j.LoggerFactory;
22
23@SuppressWarnings("all") public class PacketStreamer {
24
25 /**
26 * Packetstreamer API
27 */
28 public interface Iface {
29
30 /**
31 * Synchronous method to get packets for a given sessionid
32 *
33 * @param sessionid
34 */
35 public List<ByteBuffer> getPackets(String sessionid) throws org.apache.thrift.TException;
36
37 /**
38 * Synchronous method to publish a packet.
39 * It ensure the order that the packets are pushed
40 *
41 * @param packet
42 */
43 public int pushMessageSync(Message packet) throws org.apache.thrift.TException;
44
45 /**
46 * Asynchronous method to publish a packet.
47 * Order is not guaranteed.
48 *
49 * @param packet
50 */
51 public void pushMessageAsync(Message packet) throws org.apache.thrift.TException;
52
53 /**
54 * Terminate a session
55 *
56 * @param sessionid
57 */
58 public void terminateSession(String sessionid) throws org.apache.thrift.TException;
59
60 }
61
62 public interface AsyncIface {
63
64 public void getPackets(String sessionid, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPackets_call> resultHandler) throws org.apache.thrift.TException;
65
66 public void pushMessageSync(Message packet, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.pushMessageSync_call> resultHandler) throws org.apache.thrift.TException;
67
68 public void pushMessageAsync(Message packet, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.pushMessageAsync_call> resultHandler) throws org.apache.thrift.TException;
69
70 public void terminateSession(String sessionid, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.terminateSession_call> resultHandler) throws org.apache.thrift.TException;
71
72 }
73
74 public static class Client extends org.apache.thrift.TServiceClient implements Iface {
75 public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
76 public Factory() {}
77 public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
78 return new Client(prot);
79 }
80 public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
81 return new Client(iprot, oprot);
82 }
83 }
84
85 public Client(org.apache.thrift.protocol.TProtocol prot)
86 {
87 super(prot, prot);
88 }
89
90 public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
91 super(iprot, oprot);
92 }
93
94 public List<ByteBuffer> getPackets(String sessionid) throws org.apache.thrift.TException
95 {
96 send_getPackets(sessionid);
97 return recv_getPackets();
98 }
99
100 public void send_getPackets(String sessionid) throws org.apache.thrift.TException
101 {
102 getPackets_args args = new getPackets_args();
103 args.setSessionid(sessionid);
104 sendBase("getPackets", args);
105 }
106
107 public List<ByteBuffer> recv_getPackets() throws org.apache.thrift.TException
108 {
109 getPackets_result result = new getPackets_result();
110 receiveBase(result, "getPackets");
111 if (result.isSetSuccess()) {
112 return result.success;
113 }
114 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPackets failed: unknown result");
115 }
116
117 public int pushMessageSync(Message packet) throws org.apache.thrift.TException
118 {
119 send_pushMessageSync(packet);
120 return recv_pushMessageSync();
121 }
122
123 public void send_pushMessageSync(Message packet) throws org.apache.thrift.TException
124 {
125 pushMessageSync_args args = new pushMessageSync_args();
126 args.setPacket(packet);
127 sendBase("pushMessageSync", args);
128 }
129
130 public int recv_pushMessageSync() throws org.apache.thrift.TException
131 {
132 pushMessageSync_result result = new pushMessageSync_result();
133 receiveBase(result, "pushMessageSync");
134 if (result.isSetSuccess()) {
135 return result.success;
136 }
137 throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushMessageSync failed: unknown result");
138 }
139
140 public void pushMessageAsync(Message packet) throws org.apache.thrift.TException
141 {
142 send_pushMessageAsync(packet);
143 }
144
145 public void send_pushMessageAsync(Message packet) throws org.apache.thrift.TException
146 {
147 pushMessageAsync_args args = new pushMessageAsync_args();
148 args.setPacket(packet);
149 sendBase("pushMessageAsync", args);
150 }
151
152 public void terminateSession(String sessionid) throws org.apache.thrift.TException
153 {
154 send_terminateSession(sessionid);
155 recv_terminateSession();
156 }
157
158 public void send_terminateSession(String sessionid) throws org.apache.thrift.TException
159 {
160 terminateSession_args args = new terminateSession_args();
161 args.setSessionid(sessionid);
162 sendBase("terminateSession", args);
163 }
164
165 public void recv_terminateSession() throws org.apache.thrift.TException
166 {
167 terminateSession_result result = new terminateSession_result();
168 receiveBase(result, "terminateSession");
169 return;
170 }
171
172 }
173 public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
174 public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
175 private org.apache.thrift.async.TAsyncClientManager clientManager;
176 private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
177 public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
178 this.clientManager = clientManager;
179 this.protocolFactory = protocolFactory;
180 }
181 public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
182 return new AsyncClient(protocolFactory, clientManager, transport);
183 }
184 }
185
186 public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
187 super(protocolFactory, clientManager, transport);
188 }
189
190 public void getPackets(String sessionid, org.apache.thrift.async.AsyncMethodCallback<getPackets_call> resultHandler) throws org.apache.thrift.TException {
191 checkReady();
192 getPackets_call method_call = new getPackets_call(sessionid, resultHandler, this, ___protocolFactory, ___transport);
193 this.___currentMethod = method_call;
194 ___manager.call(method_call);
195 }
196
197 public static class getPackets_call extends org.apache.thrift.async.TAsyncMethodCall {
198 private String sessionid;
199 public getPackets_call(String sessionid, org.apache.thrift.async.AsyncMethodCallback<getPackets_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
200 super(client, protocolFactory, transport, resultHandler, false);
201 this.sessionid = sessionid;
202 }
203
204 public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
205 prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPackets", org.apache.thrift.protocol.TMessageType.CALL, 0));
206 getPackets_args args = new getPackets_args();
207 args.setSessionid(sessionid);
208 args.write(prot);
209 prot.writeMessageEnd();
210 }
211
212 public List<ByteBuffer> getResult() throws org.apache.thrift.TException {
213 if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
214 throw new IllegalStateException("Method call not finished!");
215 }
216 org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
217 org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
218 return (new Client(prot)).recv_getPackets();
219 }
220 }
221
222 public void pushMessageSync(Message packet, org.apache.thrift.async.AsyncMethodCallback<pushMessageSync_call> resultHandler) throws org.apache.thrift.TException {
223 checkReady();
224 pushMessageSync_call method_call = new pushMessageSync_call(packet, resultHandler, this, ___protocolFactory, ___transport);
225 this.___currentMethod = method_call;
226 ___manager.call(method_call);
227 }
228
229 public static class pushMessageSync_call extends org.apache.thrift.async.TAsyncMethodCall {
230 private Message packet;
231 public pushMessageSync_call(Message packet, org.apache.thrift.async.AsyncMethodCallback<pushMessageSync_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
232 super(client, protocolFactory, transport, resultHandler, false);
233 this.packet = packet;
234 }
235
236 public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
237 prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pushMessageSync", org.apache.thrift.protocol.TMessageType.CALL, 0));
238 pushMessageSync_args args = new pushMessageSync_args();
239 args.setPacket(packet);
240 args.write(prot);
241 prot.writeMessageEnd();
242 }
243
244 public int getResult() throws org.apache.thrift.TException {
245 if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
246 throw new IllegalStateException("Method call not finished!");
247 }
248 org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
249 org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
250 return (new Client(prot)).recv_pushMessageSync();
251 }
252 }
253
254 public void pushMessageAsync(Message packet, org.apache.thrift.async.AsyncMethodCallback<pushMessageAsync_call> resultHandler) throws org.apache.thrift.TException {
255 checkReady();
256 pushMessageAsync_call method_call = new pushMessageAsync_call(packet, resultHandler, this, ___protocolFactory, ___transport);
257 this.___currentMethod = method_call;
258 ___manager.call(method_call);
259 }
260
261 public static class pushMessageAsync_call extends org.apache.thrift.async.TAsyncMethodCall {
262 private Message packet;
263 public pushMessageAsync_call(Message packet, org.apache.thrift.async.AsyncMethodCallback<pushMessageAsync_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
264 super(client, protocolFactory, transport, resultHandler, true);
265 this.packet = packet;
266 }
267
268 public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
269 prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pushMessageAsync", org.apache.thrift.protocol.TMessageType.CALL, 0));
270 pushMessageAsync_args args = new pushMessageAsync_args();
271 args.setPacket(packet);
272 args.write(prot);
273 prot.writeMessageEnd();
274 }
275
276 public void getResult() throws org.apache.thrift.TException {
277 if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
278 throw new IllegalStateException("Method call not finished!");
279 }
280 org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
281 org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
282 }
283 }
284
285 public void terminateSession(String sessionid, org.apache.thrift.async.AsyncMethodCallback<terminateSession_call> resultHandler) throws org.apache.thrift.TException {
286 checkReady();
287 terminateSession_call method_call = new terminateSession_call(sessionid, resultHandler, this, ___protocolFactory, ___transport);
288 this.___currentMethod = method_call;
289 ___manager.call(method_call);
290 }
291
292 public static class terminateSession_call extends org.apache.thrift.async.TAsyncMethodCall {
293 private String sessionid;
294 public terminateSession_call(String sessionid, org.apache.thrift.async.AsyncMethodCallback<terminateSession_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
295 super(client, protocolFactory, transport, resultHandler, false);
296 this.sessionid = sessionid;
297 }
298
299 public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
300 prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("terminateSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
301 terminateSession_args args = new terminateSession_args();
302 args.setSessionid(sessionid);
303 args.write(prot);
304 prot.writeMessageEnd();
305 }
306
307 public void getResult() throws org.apache.thrift.TException {
308 if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
309 throw new IllegalStateException("Method call not finished!");
310 }
311 org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
312 org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
313 (new Client(prot)).recv_terminateSession();
314 }
315 }
316
317 }
318
319 public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
320 private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
321 public Processor(I iface) {
322 super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
323 }
324
325 protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
326 super(iface, getProcessMap(processMap));
327 }
328
329 private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
330 processMap.put("getPackets", new getPackets());
331 processMap.put("pushMessageSync", new pushMessageSync());
332 processMap.put("pushMessageAsync", new pushMessageAsync());
333 processMap.put("terminateSession", new terminateSession());
334 return processMap;
335 }
336
337 private static class getPackets<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPackets_args> {
338 public getPackets() {
339 super("getPackets");
340 }
341
342 protected getPackets_args getEmptyArgsInstance() {
343 return new getPackets_args();
344 }
345
346 protected getPackets_result getResult(I iface, getPackets_args args) throws org.apache.thrift.TException {
347 getPackets_result result = new getPackets_result();
348 result.success = iface.getPackets(args.sessionid);
349 return result;
350 }
351 }
352
353 private static class pushMessageSync<I extends Iface> extends org.apache.thrift.ProcessFunction<I, pushMessageSync_args> {
354 public pushMessageSync() {
355 super("pushMessageSync");
356 }
357
358 protected pushMessageSync_args getEmptyArgsInstance() {
359 return new pushMessageSync_args();
360 }
361
362 protected pushMessageSync_result getResult(I iface, pushMessageSync_args args) throws org.apache.thrift.TException {
363 pushMessageSync_result result = new pushMessageSync_result();
364 result.success = iface.pushMessageSync(args.packet);
365 result.setSuccessIsSet(true);
366 return result;
367 }
368 }
369
370 private static class pushMessageAsync<I extends Iface> extends org.apache.thrift.ProcessFunction<I, pushMessageAsync_args> {
371 public pushMessageAsync() {
372 super("pushMessageAsync");
373 }
374
375 protected pushMessageAsync_args getEmptyArgsInstance() {
376 return new pushMessageAsync_args();
377 }
378
379 protected org.apache.thrift.TBase getResult(I iface, pushMessageAsync_args args) throws org.apache.thrift.TException {
380 iface.pushMessageAsync(args.packet);
381 return null;
382 }
383 }
384
385 private static class terminateSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, terminateSession_args> {
386 public terminateSession() {
387 super("terminateSession");
388 }
389
390 protected terminateSession_args getEmptyArgsInstance() {
391 return new terminateSession_args();
392 }
393
394 protected terminateSession_result getResult(I iface, terminateSession_args args) throws org.apache.thrift.TException {
395 terminateSession_result result = new terminateSession_result();
396 iface.terminateSession(args.sessionid);
397 return result;
398 }
399 }
400
401 }
402
403 public static class getPackets_args implements org.apache.thrift.TBase<getPackets_args, getPackets_args._Fields>, java.io.Serializable, Cloneable {
404 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPackets_args");
405
406 private static final org.apache.thrift.protocol.TField SESSIONID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionid", org.apache.thrift.protocol.TType.STRING, (short)1);
407
408 public String sessionid; // required
409
410 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
411 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
412 SESSIONID((short)1, "sessionid");
413
414 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
415
416 static {
417 for (_Fields field : EnumSet.allOf(_Fields.class)) {
418 byName.put(field.getFieldName(), field);
419 }
420 }
421
422 /**
423 * Find the _Fields constant that matches fieldId, or null if its not found.
424 */
425 public static _Fields findByThriftId(int fieldId) {
426 switch(fieldId) {
427 case 1: // SESSIONID
428 return SESSIONID;
429 default:
430 return null;
431 }
432 }
433
434 /**
435 * Find the _Fields constant that matches fieldId, throwing an exception
436 * if it is not found.
437 */
438 public static _Fields findByThriftIdOrThrow(int fieldId) {
439 _Fields fields = findByThriftId(fieldId);
440 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
441 return fields;
442 }
443
444 /**
445 * Find the _Fields constant that matches name, or null if its not found.
446 */
447 public static _Fields findByName(String name) {
448 return byName.get(name);
449 }
450
451 private final short _thriftId;
452 private final String _fieldName;
453
454 _Fields(short thriftId, String fieldName) {
455 _thriftId = thriftId;
456 _fieldName = fieldName;
457 }
458
459 public short getThriftFieldId() {
460 return _thriftId;
461 }
462
463 public String getFieldName() {
464 return _fieldName;
465 }
466 }
467
468 // isset id assignments
469
470 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
471 static {
472 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
473 tmpMap.put(_Fields.SESSIONID, new org.apache.thrift.meta_data.FieldMetaData("sessionid", org.apache.thrift.TFieldRequirementType.DEFAULT,
474 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
475 metaDataMap = Collections.unmodifiableMap(tmpMap);
476 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPackets_args.class, metaDataMap);
477 }
478
479 public getPackets_args() {
480 }
481
482 public getPackets_args(
483 String sessionid)
484 {
485 this();
486 this.sessionid = sessionid;
487 }
488
489 /**
490 * Performs a deep copy on <i>other</i>.
491 */
492 public getPackets_args(getPackets_args other) {
493 if (other.isSetSessionid()) {
494 this.sessionid = other.sessionid;
495 }
496 }
497
498 public getPackets_args deepCopy() {
499 return new getPackets_args(this);
500 }
501
502 @Override
503 public void clear() {
504 this.sessionid = null;
505 }
506
507 public String getSessionid() {
508 return this.sessionid;
509 }
510
511 public getPackets_args setSessionid(String sessionid) {
512 this.sessionid = sessionid;
513 return this;
514 }
515
516 public void unsetSessionid() {
517 this.sessionid = null;
518 }
519
520 /** Returns true if field sessionid is set (has been assigned a value) and false otherwise */
521 public boolean isSetSessionid() {
522 return this.sessionid != null;
523 }
524
525 public void setSessionidIsSet(boolean value) {
526 if (!value) {
527 this.sessionid = null;
528 }
529 }
530
531 public void setFieldValue(_Fields field, Object value) {
532 switch (field) {
533 case SESSIONID:
534 if (value == null) {
535 unsetSessionid();
536 } else {
537 setSessionid((String)value);
538 }
539 break;
540
541 }
542 }
543
544 public Object getFieldValue(_Fields field) {
545 switch (field) {
546 case SESSIONID:
547 return getSessionid();
548
549 }
550 throw new IllegalStateException();
551 }
552
553 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
554 public boolean isSet(_Fields field) {
555 if (field == null) {
556 throw new IllegalArgumentException();
557 }
558
559 switch (field) {
560 case SESSIONID:
561 return isSetSessionid();
562 }
563 throw new IllegalStateException();
564 }
565
566 @Override
567 public boolean equals(Object that) {
568 if (that == null)
569 return false;
570 if (that instanceof getPackets_args)
571 return this.equals((getPackets_args)that);
572 return false;
573 }
574
575 public boolean equals(getPackets_args that) {
576 if (that == null)
577 return false;
578
579 boolean this_present_sessionid = true && this.isSetSessionid();
580 boolean that_present_sessionid = true && that.isSetSessionid();
581 if (this_present_sessionid || that_present_sessionid) {
582 if (!(this_present_sessionid && that_present_sessionid))
583 return false;
584 if (!this.sessionid.equals(that.sessionid))
585 return false;
586 }
587
588 return true;
589 }
590
591 @Override
592 public int hashCode() {
593 return 0;
594 }
595
596 public int compareTo(getPackets_args other) {
597 if (!getClass().equals(other.getClass())) {
598 return getClass().getName().compareTo(other.getClass().getName());
599 }
600
601 int lastComparison = 0;
602 getPackets_args typedOther = (getPackets_args)other;
603
604 lastComparison = Boolean.valueOf(isSetSessionid()).compareTo(typedOther.isSetSessionid());
605 if (lastComparison != 0) {
606 return lastComparison;
607 }
608 if (isSetSessionid()) {
609 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionid, typedOther.sessionid);
610 if (lastComparison != 0) {
611 return lastComparison;
612 }
613 }
614 return 0;
615 }
616
617 public _Fields fieldForId(int fieldId) {
618 return _Fields.findByThriftId(fieldId);
619 }
620
621 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
622 org.apache.thrift.protocol.TField field;
623 iprot.readStructBegin();
624 while (true)
625 {
626 field = iprot.readFieldBegin();
627 if (field.type == org.apache.thrift.protocol.TType.STOP) {
628 break;
629 }
630 switch (field.id) {
631 case 1: // SESSIONID
632 if (field.type == org.apache.thrift.protocol.TType.STRING) {
633 this.sessionid = iprot.readString();
634 } else {
635 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
636 }
637 break;
638 default:
639 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
640 }
641 iprot.readFieldEnd();
642 }
643 iprot.readStructEnd();
644
645 // check for required fields of primitive type, which can't be checked in the validate method
646 validate();
647 }
648
649 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
650 validate();
651
652 oprot.writeStructBegin(STRUCT_DESC);
653 if (this.sessionid != null) {
654 oprot.writeFieldBegin(SESSIONID_FIELD_DESC);
655 oprot.writeString(this.sessionid);
656 oprot.writeFieldEnd();
657 }
658 oprot.writeFieldStop();
659 oprot.writeStructEnd();
660 }
661
662 @Override
663 public String toString() {
664 StringBuilder sb = new StringBuilder("getPackets_args(");
665 boolean first = true;
666
667 sb.append("sessionid:");
668 if (this.sessionid == null) {
669 sb.append("null");
670 } else {
671 sb.append(this.sessionid);
672 }
673 first = false;
674 sb.append(")");
675 return sb.toString();
676 }
677
678 public void validate() throws org.apache.thrift.TException {
679 // check for required fields
680 }
681
682 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
683 try {
684 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
685 } catch (org.apache.thrift.TException te) {
686 throw new java.io.IOException(te);
687 }
688 }
689
690 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
691 try {
692 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
693 } catch (org.apache.thrift.TException te) {
694 throw new java.io.IOException(te);
695 }
696 }
697
698 }
699
700 public static class getPackets_result implements org.apache.thrift.TBase<getPackets_result, getPackets_result._Fields>, java.io.Serializable, Cloneable {
701 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPackets_result");
702
703 private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
704
705 public List<ByteBuffer> success; // required
706
707 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
708 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
709 SUCCESS((short)0, "success");
710
711 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
712
713 static {
714 for (_Fields field : EnumSet.allOf(_Fields.class)) {
715 byName.put(field.getFieldName(), field);
716 }
717 }
718
719 /**
720 * Find the _Fields constant that matches fieldId, or null if its not found.
721 */
722 public static _Fields findByThriftId(int fieldId) {
723 switch(fieldId) {
724 case 0: // SUCCESS
725 return SUCCESS;
726 default:
727 return null;
728 }
729 }
730
731 /**
732 * Find the _Fields constant that matches fieldId, throwing an exception
733 * if it is not found.
734 */
735 public static _Fields findByThriftIdOrThrow(int fieldId) {
736 _Fields fields = findByThriftId(fieldId);
737 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
738 return fields;
739 }
740
741 /**
742 * Find the _Fields constant that matches name, or null if its not found.
743 */
744 public static _Fields findByName(String name) {
745 return byName.get(name);
746 }
747
748 private final short _thriftId;
749 private final String _fieldName;
750
751 _Fields(short thriftId, String fieldName) {
752 _thriftId = thriftId;
753 _fieldName = fieldName;
754 }
755
756 public short getThriftFieldId() {
757 return _thriftId;
758 }
759
760 public String getFieldName() {
761 return _fieldName;
762 }
763 }
764
765 // isset id assignments
766
767 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
768 static {
769 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
770 tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
771 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
772 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
773 metaDataMap = Collections.unmodifiableMap(tmpMap);
774 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPackets_result.class, metaDataMap);
775 }
776
777 public getPackets_result() {
778 }
779
780 public getPackets_result(
781 List<ByteBuffer> success)
782 {
783 this();
784 this.success = success;
785 }
786
787 /**
788 * Performs a deep copy on <i>other</i>.
789 */
790 public getPackets_result(getPackets_result other) {
791 if (other.isSetSuccess()) {
792 List<ByteBuffer> __this__success = new ArrayList<ByteBuffer>();
793 for (ByteBuffer other_element : other.success) {
794 ByteBuffer temp_binary_element = org.apache.thrift.TBaseHelper.copyBinary(other_element);
795;
796 __this__success.add(temp_binary_element);
797 }
798 this.success = __this__success;
799 }
800 }
801
802 public getPackets_result deepCopy() {
803 return new getPackets_result(this);
804 }
805
806 @Override
807 public void clear() {
808 this.success = null;
809 }
810
811 public int getSuccessSize() {
812 return (this.success == null) ? 0 : this.success.size();
813 }
814
815 public java.util.Iterator<ByteBuffer> getSuccessIterator() {
816 return (this.success == null) ? null : this.success.iterator();
817 }
818
819 public void addToSuccess(ByteBuffer elem) {
820 if (this.success == null) {
821 this.success = new ArrayList<ByteBuffer>();
822 }
823 this.success.add(elem);
824 }
825
826 public List<ByteBuffer> getSuccess() {
827 return this.success;
828 }
829
830 public getPackets_result setSuccess(List<ByteBuffer> success) {
831 this.success = success;
832 return this;
833 }
834
835 public void unsetSuccess() {
836 this.success = null;
837 }
838
839 /** Returns true if field success is set (has been assigned a value) and false otherwise */
840 public boolean isSetSuccess() {
841 return this.success != null;
842 }
843
844 public void setSuccessIsSet(boolean value) {
845 if (!value) {
846 this.success = null;
847 }
848 }
849
850 public void setFieldValue(_Fields field, Object value) {
851 switch (field) {
852 case SUCCESS:
853 if (value == null) {
854 unsetSuccess();
855 } else {
856 setSuccess((List<ByteBuffer>)value);
857 }
858 break;
859
860 }
861 }
862
863 public Object getFieldValue(_Fields field) {
864 switch (field) {
865 case SUCCESS:
866 return getSuccess();
867
868 }
869 throw new IllegalStateException();
870 }
871
872 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
873 public boolean isSet(_Fields field) {
874 if (field == null) {
875 throw new IllegalArgumentException();
876 }
877
878 switch (field) {
879 case SUCCESS:
880 return isSetSuccess();
881 }
882 throw new IllegalStateException();
883 }
884
885 @Override
886 public boolean equals(Object that) {
887 if (that == null)
888 return false;
889 if (that instanceof getPackets_result)
890 return this.equals((getPackets_result)that);
891 return false;
892 }
893
894 public boolean equals(getPackets_result that) {
895 if (that == null)
896 return false;
897
898 boolean this_present_success = true && this.isSetSuccess();
899 boolean that_present_success = true && that.isSetSuccess();
900 if (this_present_success || that_present_success) {
901 if (!(this_present_success && that_present_success))
902 return false;
903 if (!this.success.equals(that.success))
904 return false;
905 }
906
907 return true;
908 }
909
910 @Override
911 public int hashCode() {
912 return 0;
913 }
914
915 public int compareTo(getPackets_result other) {
916 if (!getClass().equals(other.getClass())) {
917 return getClass().getName().compareTo(other.getClass().getName());
918 }
919
920 int lastComparison = 0;
921 getPackets_result typedOther = (getPackets_result)other;
922
923 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
924 if (lastComparison != 0) {
925 return lastComparison;
926 }
927 if (isSetSuccess()) {
928 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
929 if (lastComparison != 0) {
930 return lastComparison;
931 }
932 }
933 return 0;
934 }
935
936 public _Fields fieldForId(int fieldId) {
937 return _Fields.findByThriftId(fieldId);
938 }
939
940 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
941 org.apache.thrift.protocol.TField field;
942 iprot.readStructBegin();
943 while (true)
944 {
945 field = iprot.readFieldBegin();
946 if (field.type == org.apache.thrift.protocol.TType.STOP) {
947 break;
948 }
949 switch (field.id) {
950 case 0: // SUCCESS
951 if (field.type == org.apache.thrift.protocol.TType.LIST) {
952 {
953 org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
954 this.success = new ArrayList<ByteBuffer>(_list4.size);
955 for (int _i5 = 0; _i5 < _list4.size; ++_i5)
956 {
957 ByteBuffer _elem6; // required
958 _elem6 = iprot.readBinary();
959 this.success.add(_elem6);
960 }
961 iprot.readListEnd();
962 }
963 } else {
964 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
965 }
966 break;
967 default:
968 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
969 }
970 iprot.readFieldEnd();
971 }
972 iprot.readStructEnd();
973
974 // check for required fields of primitive type, which can't be checked in the validate method
975 validate();
976 }
977
978 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
979 oprot.writeStructBegin(STRUCT_DESC);
980
981 if (this.isSetSuccess()) {
982 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
983 {
984 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
985 for (ByteBuffer _iter7 : this.success)
986 {
987 oprot.writeBinary(_iter7);
988 }
989 oprot.writeListEnd();
990 }
991 oprot.writeFieldEnd();
992 }
993 oprot.writeFieldStop();
994 oprot.writeStructEnd();
995 }
996
997 @Override
998 public String toString() {
999 StringBuilder sb = new StringBuilder("getPackets_result(");
1000 boolean first = true;
1001
1002 sb.append("success:");
1003 if (this.success == null) {
1004 sb.append("null");
1005 } else {
1006 sb.append(this.success);
1007 }
1008 first = false;
1009 sb.append(")");
1010 return sb.toString();
1011 }
1012
1013 public void validate() throws org.apache.thrift.TException {
1014 // check for required fields
1015 }
1016
1017 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1018 try {
1019 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1020 } catch (org.apache.thrift.TException te) {
1021 throw new java.io.IOException(te);
1022 }
1023 }
1024
1025 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1026 try {
1027 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1028 } catch (org.apache.thrift.TException te) {
1029 throw new java.io.IOException(te);
1030 }
1031 }
1032
1033 }
1034
1035 public static class pushMessageSync_args implements org.apache.thrift.TBase<pushMessageSync_args, pushMessageSync_args._Fields>, java.io.Serializable, Cloneable {
1036 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushMessageSync_args");
1037
1038 private static final org.apache.thrift.protocol.TField PACKET_FIELD_DESC = new org.apache.thrift.protocol.TField("packet", org.apache.thrift.protocol.TType.STRUCT, (short)1);
1039
1040 public Message packet; // required
1041
1042 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1043 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1044 PACKET((short)1, "packet");
1045
1046 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1047
1048 static {
1049 for (_Fields field : EnumSet.allOf(_Fields.class)) {
1050 byName.put(field.getFieldName(), field);
1051 }
1052 }
1053
1054 /**
1055 * Find the _Fields constant that matches fieldId, or null if its not found.
1056 */
1057 public static _Fields findByThriftId(int fieldId) {
1058 switch(fieldId) {
1059 case 1: // PACKET
1060 return PACKET;
1061 default:
1062 return null;
1063 }
1064 }
1065
1066 /**
1067 * Find the _Fields constant that matches fieldId, throwing an exception
1068 * if it is not found.
1069 */
1070 public static _Fields findByThriftIdOrThrow(int fieldId) {
1071 _Fields fields = findByThriftId(fieldId);
1072 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1073 return fields;
1074 }
1075
1076 /**
1077 * Find the _Fields constant that matches name, or null if its not found.
1078 */
1079 public static _Fields findByName(String name) {
1080 return byName.get(name);
1081 }
1082
1083 private final short _thriftId;
1084 private final String _fieldName;
1085
1086 _Fields(short thriftId, String fieldName) {
1087 _thriftId = thriftId;
1088 _fieldName = fieldName;
1089 }
1090
1091 public short getThriftFieldId() {
1092 return _thriftId;
1093 }
1094
1095 public String getFieldName() {
1096 return _fieldName;
1097 }
1098 }
1099
1100 // isset id assignments
1101
1102 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1103 static {
1104 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1105 tmpMap.put(_Fields.PACKET, new org.apache.thrift.meta_data.FieldMetaData("packet", org.apache.thrift.TFieldRequirementType.DEFAULT,
1106 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Message.class)));
1107 metaDataMap = Collections.unmodifiableMap(tmpMap);
1108 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushMessageSync_args.class, metaDataMap);
1109 }
1110
1111 public pushMessageSync_args() {
1112 }
1113
1114 public pushMessageSync_args(
1115 Message packet)
1116 {
1117 this();
1118 this.packet = packet;
1119 }
1120
1121 /**
1122 * Performs a deep copy on <i>other</i>.
1123 */
1124 public pushMessageSync_args(pushMessageSync_args other) {
1125 if (other.isSetPacket()) {
1126 this.packet = new Message(other.packet);
1127 }
1128 }
1129
1130 public pushMessageSync_args deepCopy() {
1131 return new pushMessageSync_args(this);
1132 }
1133
1134 @Override
1135 public void clear() {
1136 this.packet = null;
1137 }
1138
1139 public Message getPacket() {
1140 return this.packet;
1141 }
1142
1143 public pushMessageSync_args setPacket(Message packet) {
1144 this.packet = packet;
1145 return this;
1146 }
1147
1148 public void unsetPacket() {
1149 this.packet = null;
1150 }
1151
1152 /** Returns true if field packet is set (has been assigned a value) and false otherwise */
1153 public boolean isSetPacket() {
1154 return this.packet != null;
1155 }
1156
1157 public void setPacketIsSet(boolean value) {
1158 if (!value) {
1159 this.packet = null;
1160 }
1161 }
1162
1163 public void setFieldValue(_Fields field, Object value) {
1164 switch (field) {
1165 case PACKET:
1166 if (value == null) {
1167 unsetPacket();
1168 } else {
1169 setPacket((Message)value);
1170 }
1171 break;
1172
1173 }
1174 }
1175
1176 public Object getFieldValue(_Fields field) {
1177 switch (field) {
1178 case PACKET:
1179 return getPacket();
1180
1181 }
1182 throw new IllegalStateException();
1183 }
1184
1185 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1186 public boolean isSet(_Fields field) {
1187 if (field == null) {
1188 throw new IllegalArgumentException();
1189 }
1190
1191 switch (field) {
1192 case PACKET:
1193 return isSetPacket();
1194 }
1195 throw new IllegalStateException();
1196 }
1197
1198 @Override
1199 public boolean equals(Object that) {
1200 if (that == null)
1201 return false;
1202 if (that instanceof pushMessageSync_args)
1203 return this.equals((pushMessageSync_args)that);
1204 return false;
1205 }
1206
1207 public boolean equals(pushMessageSync_args that) {
1208 if (that == null)
1209 return false;
1210
1211 boolean this_present_packet = true && this.isSetPacket();
1212 boolean that_present_packet = true && that.isSetPacket();
1213 if (this_present_packet || that_present_packet) {
1214 if (!(this_present_packet && that_present_packet))
1215 return false;
1216 if (!this.packet.equals(that.packet))
1217 return false;
1218 }
1219
1220 return true;
1221 }
1222
1223 @Override
1224 public int hashCode() {
1225 return 0;
1226 }
1227
1228 public int compareTo(pushMessageSync_args other) {
1229 if (!getClass().equals(other.getClass())) {
1230 return getClass().getName().compareTo(other.getClass().getName());
1231 }
1232
1233 int lastComparison = 0;
1234 pushMessageSync_args typedOther = (pushMessageSync_args)other;
1235
1236 lastComparison = Boolean.valueOf(isSetPacket()).compareTo(typedOther.isSetPacket());
1237 if (lastComparison != 0) {
1238 return lastComparison;
1239 }
1240 if (isSetPacket()) {
1241 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.packet, typedOther.packet);
1242 if (lastComparison != 0) {
1243 return lastComparison;
1244 }
1245 }
1246 return 0;
1247 }
1248
1249 public _Fields fieldForId(int fieldId) {
1250 return _Fields.findByThriftId(fieldId);
1251 }
1252
1253 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1254 org.apache.thrift.protocol.TField field;
1255 iprot.readStructBegin();
1256 while (true)
1257 {
1258 field = iprot.readFieldBegin();
1259 if (field.type == org.apache.thrift.protocol.TType.STOP) {
1260 break;
1261 }
1262 switch (field.id) {
1263 case 1: // PACKET
1264 if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1265 this.packet = new Message();
1266 this.packet.read(iprot);
1267 } else {
1268 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1269 }
1270 break;
1271 default:
1272 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1273 }
1274 iprot.readFieldEnd();
1275 }
1276 iprot.readStructEnd();
1277
1278 // check for required fields of primitive type, which can't be checked in the validate method
1279 validate();
1280 }
1281
1282 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1283 validate();
1284
1285 oprot.writeStructBegin(STRUCT_DESC);
1286 if (this.packet != null) {
1287 oprot.writeFieldBegin(PACKET_FIELD_DESC);
1288 this.packet.write(oprot);
1289 oprot.writeFieldEnd();
1290 }
1291 oprot.writeFieldStop();
1292 oprot.writeStructEnd();
1293 }
1294
1295 @Override
1296 public String toString() {
1297 StringBuilder sb = new StringBuilder("pushMessageSync_args(");
1298 boolean first = true;
1299
1300 sb.append("packet:");
1301 if (this.packet == null) {
1302 sb.append("null");
1303 } else {
1304 sb.append(this.packet);
1305 }
1306 first = false;
1307 sb.append(")");
1308 return sb.toString();
1309 }
1310
1311 public void validate() throws org.apache.thrift.TException {
1312 // check for required fields
1313 }
1314
1315 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1316 try {
1317 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1318 } catch (org.apache.thrift.TException te) {
1319 throw new java.io.IOException(te);
1320 }
1321 }
1322
1323 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1324 try {
1325 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1326 } catch (org.apache.thrift.TException te) {
1327 throw new java.io.IOException(te);
1328 }
1329 }
1330
1331 }
1332
1333 public static class pushMessageSync_result implements org.apache.thrift.TBase<pushMessageSync_result, pushMessageSync_result._Fields>, java.io.Serializable, Cloneable {
1334 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushMessageSync_result");
1335
1336 private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
1337
1338 public int success; // required
1339
1340 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1341 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1342 SUCCESS((short)0, "success");
1343
1344 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1345
1346 static {
1347 for (_Fields field : EnumSet.allOf(_Fields.class)) {
1348 byName.put(field.getFieldName(), field);
1349 }
1350 }
1351
1352 /**
1353 * Find the _Fields constant that matches fieldId, or null if its not found.
1354 */
1355 public static _Fields findByThriftId(int fieldId) {
1356 switch(fieldId) {
1357 case 0: // SUCCESS
1358 return SUCCESS;
1359 default:
1360 return null;
1361 }
1362 }
1363
1364 /**
1365 * Find the _Fields constant that matches fieldId, throwing an exception
1366 * if it is not found.
1367 */
1368 public static _Fields findByThriftIdOrThrow(int fieldId) {
1369 _Fields fields = findByThriftId(fieldId);
1370 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1371 return fields;
1372 }
1373
1374 /**
1375 * Find the _Fields constant that matches name, or null if its not found.
1376 */
1377 public static _Fields findByName(String name) {
1378 return byName.get(name);
1379 }
1380
1381 private final short _thriftId;
1382 private final String _fieldName;
1383
1384 _Fields(short thriftId, String fieldName) {
1385 _thriftId = thriftId;
1386 _fieldName = fieldName;
1387 }
1388
1389 public short getThriftFieldId() {
1390 return _thriftId;
1391 }
1392
1393 public String getFieldName() {
1394 return _fieldName;
1395 }
1396 }
1397
1398 // isset id assignments
1399 private static final int __SUCCESS_ISSET_ID = 0;
1400 private BitSet __isset_bit_vector = new BitSet(1);
1401
1402 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1403 static {
1404 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1405 tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
1406 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
1407 metaDataMap = Collections.unmodifiableMap(tmpMap);
1408 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushMessageSync_result.class, metaDataMap);
1409 }
1410
1411 public pushMessageSync_result() {
1412 }
1413
1414 public pushMessageSync_result(
1415 int success)
1416 {
1417 this();
1418 this.success = success;
1419 setSuccessIsSet(true);
1420 }
1421
1422 /**
1423 * Performs a deep copy on <i>other</i>.
1424 */
1425 public pushMessageSync_result(pushMessageSync_result other) {
1426 __isset_bit_vector.clear();
1427 __isset_bit_vector.or(other.__isset_bit_vector);
1428 this.success = other.success;
1429 }
1430
1431 public pushMessageSync_result deepCopy() {
1432 return new pushMessageSync_result(this);
1433 }
1434
1435 @Override
1436 public void clear() {
1437 setSuccessIsSet(false);
1438 this.success = 0;
1439 }
1440
1441 public int getSuccess() {
1442 return this.success;
1443 }
1444
1445 public pushMessageSync_result setSuccess(int success) {
1446 this.success = success;
1447 setSuccessIsSet(true);
1448 return this;
1449 }
1450
1451 public void unsetSuccess() {
1452 __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
1453 }
1454
1455 /** Returns true if field success is set (has been assigned a value) and false otherwise */
1456 public boolean isSetSuccess() {
1457 return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
1458 }
1459
1460 public void setSuccessIsSet(boolean value) {
1461 __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
1462 }
1463
1464 public void setFieldValue(_Fields field, Object value) {
1465 switch (field) {
1466 case SUCCESS:
1467 if (value == null) {
1468 unsetSuccess();
1469 } else {
1470 setSuccess((Integer)value);
1471 }
1472 break;
1473
1474 }
1475 }
1476
1477 public Object getFieldValue(_Fields field) {
1478 switch (field) {
1479 case SUCCESS:
1480 return Integer.valueOf(getSuccess());
1481
1482 }
1483 throw new IllegalStateException();
1484 }
1485
1486 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1487 public boolean isSet(_Fields field) {
1488 if (field == null) {
1489 throw new IllegalArgumentException();
1490 }
1491
1492 switch (field) {
1493 case SUCCESS:
1494 return isSetSuccess();
1495 }
1496 throw new IllegalStateException();
1497 }
1498
1499 @Override
1500 public boolean equals(Object that) {
1501 if (that == null)
1502 return false;
1503 if (that instanceof pushMessageSync_result)
1504 return this.equals((pushMessageSync_result)that);
1505 return false;
1506 }
1507
1508 public boolean equals(pushMessageSync_result that) {
1509 if (that == null)
1510 return false;
1511
1512 boolean this_present_success = true;
1513 boolean that_present_success = true;
1514 if (this_present_success || that_present_success) {
1515 if (!(this_present_success && that_present_success))
1516 return false;
1517 if (this.success != that.success)
1518 return false;
1519 }
1520
1521 return true;
1522 }
1523
1524 @Override
1525 public int hashCode() {
1526 return 0;
1527 }
1528
1529 public int compareTo(pushMessageSync_result other) {
1530 if (!getClass().equals(other.getClass())) {
1531 return getClass().getName().compareTo(other.getClass().getName());
1532 }
1533
1534 int lastComparison = 0;
1535 pushMessageSync_result typedOther = (pushMessageSync_result)other;
1536
1537 lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
1538 if (lastComparison != 0) {
1539 return lastComparison;
1540 }
1541 if (isSetSuccess()) {
1542 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
1543 if (lastComparison != 0) {
1544 return lastComparison;
1545 }
1546 }
1547 return 0;
1548 }
1549
1550 public _Fields fieldForId(int fieldId) {
1551 return _Fields.findByThriftId(fieldId);
1552 }
1553
1554 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1555 org.apache.thrift.protocol.TField field;
1556 iprot.readStructBegin();
1557 while (true)
1558 {
1559 field = iprot.readFieldBegin();
1560 if (field.type == org.apache.thrift.protocol.TType.STOP) {
1561 break;
1562 }
1563 switch (field.id) {
1564 case 0: // SUCCESS
1565 if (field.type == org.apache.thrift.protocol.TType.I32) {
1566 this.success = iprot.readI32();
1567 setSuccessIsSet(true);
1568 } else {
1569 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1570 }
1571 break;
1572 default:
1573 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1574 }
1575 iprot.readFieldEnd();
1576 }
1577 iprot.readStructEnd();
1578
1579 // check for required fields of primitive type, which can't be checked in the validate method
1580 validate();
1581 }
1582
1583 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1584 oprot.writeStructBegin(STRUCT_DESC);
1585
1586 if (this.isSetSuccess()) {
1587 oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1588 oprot.writeI32(this.success);
1589 oprot.writeFieldEnd();
1590 }
1591 oprot.writeFieldStop();
1592 oprot.writeStructEnd();
1593 }
1594
1595 @Override
1596 public String toString() {
1597 StringBuilder sb = new StringBuilder("pushMessageSync_result(");
1598 boolean first = true;
1599
1600 sb.append("success:");
1601 sb.append(this.success);
1602 first = false;
1603 sb.append(")");
1604 return sb.toString();
1605 }
1606
1607 public void validate() throws org.apache.thrift.TException {
1608 // check for required fields
1609 }
1610
1611 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1612 try {
1613 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1614 } catch (org.apache.thrift.TException te) {
1615 throw new java.io.IOException(te);
1616 }
1617 }
1618
1619 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1620 try {
1621 // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1622 __isset_bit_vector = new BitSet(1);
1623 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1624 } catch (org.apache.thrift.TException te) {
1625 throw new java.io.IOException(te);
1626 }
1627 }
1628
1629 }
1630
1631 public static class pushMessageAsync_args implements org.apache.thrift.TBase<pushMessageAsync_args, pushMessageAsync_args._Fields>, java.io.Serializable, Cloneable {
1632 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushMessageAsync_args");
1633
1634 private static final org.apache.thrift.protocol.TField PACKET_FIELD_DESC = new org.apache.thrift.protocol.TField("packet", org.apache.thrift.protocol.TType.STRUCT, (short)1);
1635
1636 public Message packet; // required
1637
1638 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1639 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1640 PACKET((short)1, "packet");
1641
1642 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1643
1644 static {
1645 for (_Fields field : EnumSet.allOf(_Fields.class)) {
1646 byName.put(field.getFieldName(), field);
1647 }
1648 }
1649
1650 /**
1651 * Find the _Fields constant that matches fieldId, or null if its not found.
1652 */
1653 public static _Fields findByThriftId(int fieldId) {
1654 switch(fieldId) {
1655 case 1: // PACKET
1656 return PACKET;
1657 default:
1658 return null;
1659 }
1660 }
1661
1662 /**
1663 * Find the _Fields constant that matches fieldId, throwing an exception
1664 * if it is not found.
1665 */
1666 public static _Fields findByThriftIdOrThrow(int fieldId) {
1667 _Fields fields = findByThriftId(fieldId);
1668 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1669 return fields;
1670 }
1671
1672 /**
1673 * Find the _Fields constant that matches name, or null if its not found.
1674 */
1675 public static _Fields findByName(String name) {
1676 return byName.get(name);
1677 }
1678
1679 private final short _thriftId;
1680 private final String _fieldName;
1681
1682 _Fields(short thriftId, String fieldName) {
1683 _thriftId = thriftId;
1684 _fieldName = fieldName;
1685 }
1686
1687 public short getThriftFieldId() {
1688 return _thriftId;
1689 }
1690
1691 public String getFieldName() {
1692 return _fieldName;
1693 }
1694 }
1695
1696 // isset id assignments
1697
1698 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1699 static {
1700 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1701 tmpMap.put(_Fields.PACKET, new org.apache.thrift.meta_data.FieldMetaData("packet", org.apache.thrift.TFieldRequirementType.DEFAULT,
1702 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Message.class)));
1703 metaDataMap = Collections.unmodifiableMap(tmpMap);
1704 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushMessageAsync_args.class, metaDataMap);
1705 }
1706
1707 public pushMessageAsync_args() {
1708 }
1709
1710 public pushMessageAsync_args(
1711 Message packet)
1712 {
1713 this();
1714 this.packet = packet;
1715 }
1716
1717 /**
1718 * Performs a deep copy on <i>other</i>.
1719 */
1720 public pushMessageAsync_args(pushMessageAsync_args other) {
1721 if (other.isSetPacket()) {
1722 this.packet = new Message(other.packet);
1723 }
1724 }
1725
1726 public pushMessageAsync_args deepCopy() {
1727 return new pushMessageAsync_args(this);
1728 }
1729
1730 @Override
1731 public void clear() {
1732 this.packet = null;
1733 }
1734
1735 public Message getPacket() {
1736 return this.packet;
1737 }
1738
1739 public pushMessageAsync_args setPacket(Message packet) {
1740 this.packet = packet;
1741 return this;
1742 }
1743
1744 public void unsetPacket() {
1745 this.packet = null;
1746 }
1747
1748 /** Returns true if field packet is set (has been assigned a value) and false otherwise */
1749 public boolean isSetPacket() {
1750 return this.packet != null;
1751 }
1752
1753 public void setPacketIsSet(boolean value) {
1754 if (!value) {
1755 this.packet = null;
1756 }
1757 }
1758
1759 public void setFieldValue(_Fields field, Object value) {
1760 switch (field) {
1761 case PACKET:
1762 if (value == null) {
1763 unsetPacket();
1764 } else {
1765 setPacket((Message)value);
1766 }
1767 break;
1768
1769 }
1770 }
1771
1772 public Object getFieldValue(_Fields field) {
1773 switch (field) {
1774 case PACKET:
1775 return getPacket();
1776
1777 }
1778 throw new IllegalStateException();
1779 }
1780
1781 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1782 public boolean isSet(_Fields field) {
1783 if (field == null) {
1784 throw new IllegalArgumentException();
1785 }
1786
1787 switch (field) {
1788 case PACKET:
1789 return isSetPacket();
1790 }
1791 throw new IllegalStateException();
1792 }
1793
1794 @Override
1795 public boolean equals(Object that) {
1796 if (that == null)
1797 return false;
1798 if (that instanceof pushMessageAsync_args)
1799 return this.equals((pushMessageAsync_args)that);
1800 return false;
1801 }
1802
1803 public boolean equals(pushMessageAsync_args that) {
1804 if (that == null)
1805 return false;
1806
1807 boolean this_present_packet = true && this.isSetPacket();
1808 boolean that_present_packet = true && that.isSetPacket();
1809 if (this_present_packet || that_present_packet) {
1810 if (!(this_present_packet && that_present_packet))
1811 return false;
1812 if (!this.packet.equals(that.packet))
1813 return false;
1814 }
1815
1816 return true;
1817 }
1818
1819 @Override
1820 public int hashCode() {
1821 return 0;
1822 }
1823
1824 public int compareTo(pushMessageAsync_args other) {
1825 if (!getClass().equals(other.getClass())) {
1826 return getClass().getName().compareTo(other.getClass().getName());
1827 }
1828
1829 int lastComparison = 0;
1830 pushMessageAsync_args typedOther = (pushMessageAsync_args)other;
1831
1832 lastComparison = Boolean.valueOf(isSetPacket()).compareTo(typedOther.isSetPacket());
1833 if (lastComparison != 0) {
1834 return lastComparison;
1835 }
1836 if (isSetPacket()) {
1837 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.packet, typedOther.packet);
1838 if (lastComparison != 0) {
1839 return lastComparison;
1840 }
1841 }
1842 return 0;
1843 }
1844
1845 public _Fields fieldForId(int fieldId) {
1846 return _Fields.findByThriftId(fieldId);
1847 }
1848
1849 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1850 org.apache.thrift.protocol.TField field;
1851 iprot.readStructBegin();
1852 while (true)
1853 {
1854 field = iprot.readFieldBegin();
1855 if (field.type == org.apache.thrift.protocol.TType.STOP) {
1856 break;
1857 }
1858 switch (field.id) {
1859 case 1: // PACKET
1860 if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1861 this.packet = new Message();
1862 this.packet.read(iprot);
1863 } else {
1864 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1865 }
1866 break;
1867 default:
1868 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1869 }
1870 iprot.readFieldEnd();
1871 }
1872 iprot.readStructEnd();
1873
1874 // check for required fields of primitive type, which can't be checked in the validate method
1875 validate();
1876 }
1877
1878 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1879 validate();
1880
1881 oprot.writeStructBegin(STRUCT_DESC);
1882 if (this.packet != null) {
1883 oprot.writeFieldBegin(PACKET_FIELD_DESC);
1884 this.packet.write(oprot);
1885 oprot.writeFieldEnd();
1886 }
1887 oprot.writeFieldStop();
1888 oprot.writeStructEnd();
1889 }
1890
1891 @Override
1892 public String toString() {
1893 StringBuilder sb = new StringBuilder("pushMessageAsync_args(");
1894 boolean first = true;
1895
1896 sb.append("packet:");
1897 if (this.packet == null) {
1898 sb.append("null");
1899 } else {
1900 sb.append(this.packet);
1901 }
1902 first = false;
1903 sb.append(")");
1904 return sb.toString();
1905 }
1906
1907 public void validate() throws org.apache.thrift.TException {
1908 // check for required fields
1909 }
1910
1911 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1912 try {
1913 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1914 } catch (org.apache.thrift.TException te) {
1915 throw new java.io.IOException(te);
1916 }
1917 }
1918
1919 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1920 try {
1921 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1922 } catch (org.apache.thrift.TException te) {
1923 throw new java.io.IOException(te);
1924 }
1925 }
1926
1927 }
1928
1929 public static class terminateSession_args implements org.apache.thrift.TBase<terminateSession_args, terminateSession_args._Fields>, java.io.Serializable, Cloneable {
1930 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("terminateSession_args");
1931
1932 private static final org.apache.thrift.protocol.TField SESSIONID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionid", org.apache.thrift.protocol.TType.STRING, (short)1);
1933
1934 public String sessionid; // required
1935
1936 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1937 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1938 SESSIONID((short)1, "sessionid");
1939
1940 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1941
1942 static {
1943 for (_Fields field : EnumSet.allOf(_Fields.class)) {
1944 byName.put(field.getFieldName(), field);
1945 }
1946 }
1947
1948 /**
1949 * Find the _Fields constant that matches fieldId, or null if its not found.
1950 */
1951 public static _Fields findByThriftId(int fieldId) {
1952 switch(fieldId) {
1953 case 1: // SESSIONID
1954 return SESSIONID;
1955 default:
1956 return null;
1957 }
1958 }
1959
1960 /**
1961 * Find the _Fields constant that matches fieldId, throwing an exception
1962 * if it is not found.
1963 */
1964 public static _Fields findByThriftIdOrThrow(int fieldId) {
1965 _Fields fields = findByThriftId(fieldId);
1966 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1967 return fields;
1968 }
1969
1970 /**
1971 * Find the _Fields constant that matches name, or null if its not found.
1972 */
1973 public static _Fields findByName(String name) {
1974 return byName.get(name);
1975 }
1976
1977 private final short _thriftId;
1978 private final String _fieldName;
1979
1980 _Fields(short thriftId, String fieldName) {
1981 _thriftId = thriftId;
1982 _fieldName = fieldName;
1983 }
1984
1985 public short getThriftFieldId() {
1986 return _thriftId;
1987 }
1988
1989 public String getFieldName() {
1990 return _fieldName;
1991 }
1992 }
1993
1994 // isset id assignments
1995
1996 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1997 static {
1998 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1999 tmpMap.put(_Fields.SESSIONID, new org.apache.thrift.meta_data.FieldMetaData("sessionid", org.apache.thrift.TFieldRequirementType.DEFAULT,
2000 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
2001 metaDataMap = Collections.unmodifiableMap(tmpMap);
2002 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(terminateSession_args.class, metaDataMap);
2003 }
2004
2005 public terminateSession_args() {
2006 }
2007
2008 public terminateSession_args(
2009 String sessionid)
2010 {
2011 this();
2012 this.sessionid = sessionid;
2013 }
2014
2015 /**
2016 * Performs a deep copy on <i>other</i>.
2017 */
2018 public terminateSession_args(terminateSession_args other) {
2019 if (other.isSetSessionid()) {
2020 this.sessionid = other.sessionid;
2021 }
2022 }
2023
2024 public terminateSession_args deepCopy() {
2025 return new terminateSession_args(this);
2026 }
2027
2028 @Override
2029 public void clear() {
2030 this.sessionid = null;
2031 }
2032
2033 public String getSessionid() {
2034 return this.sessionid;
2035 }
2036
2037 public terminateSession_args setSessionid(String sessionid) {
2038 this.sessionid = sessionid;
2039 return this;
2040 }
2041
2042 public void unsetSessionid() {
2043 this.sessionid = null;
2044 }
2045
2046 /** Returns true if field sessionid is set (has been assigned a value) and false otherwise */
2047 public boolean isSetSessionid() {
2048 return this.sessionid != null;
2049 }
2050
2051 public void setSessionidIsSet(boolean value) {
2052 if (!value) {
2053 this.sessionid = null;
2054 }
2055 }
2056
2057 public void setFieldValue(_Fields field, Object value) {
2058 switch (field) {
2059 case SESSIONID:
2060 if (value == null) {
2061 unsetSessionid();
2062 } else {
2063 setSessionid((String)value);
2064 }
2065 break;
2066
2067 }
2068 }
2069
2070 public Object getFieldValue(_Fields field) {
2071 switch (field) {
2072 case SESSIONID:
2073 return getSessionid();
2074
2075 }
2076 throw new IllegalStateException();
2077 }
2078
2079 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2080 public boolean isSet(_Fields field) {
2081 if (field == null) {
2082 throw new IllegalArgumentException();
2083 }
2084
2085 switch (field) {
2086 case SESSIONID:
2087 return isSetSessionid();
2088 }
2089 throw new IllegalStateException();
2090 }
2091
2092 @Override
2093 public boolean equals(Object that) {
2094 if (that == null)
2095 return false;
2096 if (that instanceof terminateSession_args)
2097 return this.equals((terminateSession_args)that);
2098 return false;
2099 }
2100
2101 public boolean equals(terminateSession_args that) {
2102 if (that == null)
2103 return false;
2104
2105 boolean this_present_sessionid = true && this.isSetSessionid();
2106 boolean that_present_sessionid = true && that.isSetSessionid();
2107 if (this_present_sessionid || that_present_sessionid) {
2108 if (!(this_present_sessionid && that_present_sessionid))
2109 return false;
2110 if (!this.sessionid.equals(that.sessionid))
2111 return false;
2112 }
2113
2114 return true;
2115 }
2116
2117 @Override
2118 public int hashCode() {
2119 return 0;
2120 }
2121
2122 public int compareTo(terminateSession_args other) {
2123 if (!getClass().equals(other.getClass())) {
2124 return getClass().getName().compareTo(other.getClass().getName());
2125 }
2126
2127 int lastComparison = 0;
2128 terminateSession_args typedOther = (terminateSession_args)other;
2129
2130 lastComparison = Boolean.valueOf(isSetSessionid()).compareTo(typedOther.isSetSessionid());
2131 if (lastComparison != 0) {
2132 return lastComparison;
2133 }
2134 if (isSetSessionid()) {
2135 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionid, typedOther.sessionid);
2136 if (lastComparison != 0) {
2137 return lastComparison;
2138 }
2139 }
2140 return 0;
2141 }
2142
2143 public _Fields fieldForId(int fieldId) {
2144 return _Fields.findByThriftId(fieldId);
2145 }
2146
2147 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2148 org.apache.thrift.protocol.TField field;
2149 iprot.readStructBegin();
2150 while (true)
2151 {
2152 field = iprot.readFieldBegin();
2153 if (field.type == org.apache.thrift.protocol.TType.STOP) {
2154 break;
2155 }
2156 switch (field.id) {
2157 case 1: // SESSIONID
2158 if (field.type == org.apache.thrift.protocol.TType.STRING) {
2159 this.sessionid = iprot.readString();
2160 } else {
2161 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2162 }
2163 break;
2164 default:
2165 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2166 }
2167 iprot.readFieldEnd();
2168 }
2169 iprot.readStructEnd();
2170
2171 // check for required fields of primitive type, which can't be checked in the validate method
2172 validate();
2173 }
2174
2175 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2176 validate();
2177
2178 oprot.writeStructBegin(STRUCT_DESC);
2179 if (this.sessionid != null) {
2180 oprot.writeFieldBegin(SESSIONID_FIELD_DESC);
2181 oprot.writeString(this.sessionid);
2182 oprot.writeFieldEnd();
2183 }
2184 oprot.writeFieldStop();
2185 oprot.writeStructEnd();
2186 }
2187
2188 @Override
2189 public String toString() {
2190 StringBuilder sb = new StringBuilder("terminateSession_args(");
2191 boolean first = true;
2192
2193 sb.append("sessionid:");
2194 if (this.sessionid == null) {
2195 sb.append("null");
2196 } else {
2197 sb.append(this.sessionid);
2198 }
2199 first = false;
2200 sb.append(")");
2201 return sb.toString();
2202 }
2203
2204 public void validate() throws org.apache.thrift.TException {
2205 // check for required fields
2206 }
2207
2208 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2209 try {
2210 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2211 } catch (org.apache.thrift.TException te) {
2212 throw new java.io.IOException(te);
2213 }
2214 }
2215
2216 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2217 try {
2218 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2219 } catch (org.apache.thrift.TException te) {
2220 throw new java.io.IOException(te);
2221 }
2222 }
2223
2224 }
2225
2226 public static class terminateSession_result implements org.apache.thrift.TBase<terminateSession_result, terminateSession_result._Fields>, java.io.Serializable, Cloneable {
2227 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("terminateSession_result");
2228
2229
2230
2231 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2232 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2233;
2234
2235 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2236
2237 static {
2238 for (_Fields field : EnumSet.allOf(_Fields.class)) {
2239 byName.put(field.getFieldName(), field);
2240 }
2241 }
2242
2243 /**
2244 * Find the _Fields constant that matches fieldId, or null if its not found.
2245 */
2246 public static _Fields findByThriftId(int fieldId) {
2247 switch(fieldId) {
2248 default:
2249 return null;
2250 }
2251 }
2252
2253 /**
2254 * Find the _Fields constant that matches fieldId, throwing an exception
2255 * if it is not found.
2256 */
2257 public static _Fields findByThriftIdOrThrow(int fieldId) {
2258 _Fields fields = findByThriftId(fieldId);
2259 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2260 return fields;
2261 }
2262
2263 /**
2264 * Find the _Fields constant that matches name, or null if its not found.
2265 */
2266 public static _Fields findByName(String name) {
2267 return byName.get(name);
2268 }
2269
2270 private final short _thriftId;
2271 private final String _fieldName;
2272
2273 _Fields(short thriftId, String fieldName) {
2274 _thriftId = thriftId;
2275 _fieldName = fieldName;
2276 }
2277
2278 public short getThriftFieldId() {
2279 return _thriftId;
2280 }
2281
2282 public String getFieldName() {
2283 return _fieldName;
2284 }
2285 }
2286 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2287 static {
2288 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2289 metaDataMap = Collections.unmodifiableMap(tmpMap);
2290 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(terminateSession_result.class, metaDataMap);
2291 }
2292
2293 public terminateSession_result() {
2294 }
2295
2296 /**
2297 * Performs a deep copy on <i>other</i>.
2298 */
2299 public terminateSession_result(terminateSession_result other) {
2300 }
2301
2302 public terminateSession_result deepCopy() {
2303 return new terminateSession_result(this);
2304 }
2305
2306 @Override
2307 public void clear() {
2308 }
2309
2310 public void setFieldValue(_Fields field, Object value) {
2311 switch (field) {
2312 }
2313 }
2314
2315 public Object getFieldValue(_Fields field) {
2316 switch (field) {
2317 }
2318 throw new IllegalStateException();
2319 }
2320
2321 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2322 public boolean isSet(_Fields field) {
2323 if (field == null) {
2324 throw new IllegalArgumentException();
2325 }
2326
2327 switch (field) {
2328 }
2329 throw new IllegalStateException();
2330 }
2331
2332 @Override
2333 public boolean equals(Object that) {
2334 if (that == null)
2335 return false;
2336 if (that instanceof terminateSession_result)
2337 return this.equals((terminateSession_result)that);
2338 return false;
2339 }
2340
2341 public boolean equals(terminateSession_result that) {
2342 if (that == null)
2343 return false;
2344
2345 return true;
2346 }
2347
2348 @Override
2349 public int hashCode() {
2350 return 0;
2351 }
2352
2353 public int compareTo(terminateSession_result other) {
2354 if (!getClass().equals(other.getClass())) {
2355 return getClass().getName().compareTo(other.getClass().getName());
2356 }
2357
2358 int lastComparison = 0;
2359 terminateSession_result typedOther = (terminateSession_result)other;
2360
2361 return 0;
2362 }
2363
2364 public _Fields fieldForId(int fieldId) {
2365 return _Fields.findByThriftId(fieldId);
2366 }
2367
2368 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2369 org.apache.thrift.protocol.TField field;
2370 iprot.readStructBegin();
2371 while (true)
2372 {
2373 field = iprot.readFieldBegin();
2374 if (field.type == org.apache.thrift.protocol.TType.STOP) {
2375 break;
2376 }
2377 switch (field.id) {
2378 default:
2379 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2380 }
2381 iprot.readFieldEnd();
2382 }
2383 iprot.readStructEnd();
2384
2385 // check for required fields of primitive type, which can't be checked in the validate method
2386 validate();
2387 }
2388
2389 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2390 oprot.writeStructBegin(STRUCT_DESC);
2391
2392 oprot.writeFieldStop();
2393 oprot.writeStructEnd();
2394 }
2395
2396 @Override
2397 public String toString() {
2398 StringBuilder sb = new StringBuilder("terminateSession_result(");
2399 boolean first = true;
2400
2401 sb.append(")");
2402 return sb.toString();
2403 }
2404
2405 public void validate() throws org.apache.thrift.TException {
2406 // check for required fields
2407 }
2408
2409 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2410 try {
2411 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2412 } catch (org.apache.thrift.TException te) {
2413 throw new java.io.IOException(te);
2414 }
2415 }
2416
2417 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2418 try {
2419 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2420 } catch (org.apache.thrift.TException te) {
2421 throw new java.io.IOException(te);
2422 }
2423 }
2424
2425 }
2426
2427}