blob: c24f616128c2551484d8f0a347950881a08236c4 [file] [log] [blame]
Mark Sleeefd37f12007-11-20 05:13:09 +00001SystemOrganization addCategory: #Thrift!
2SystemOrganization addCategory: #'Thrift-Protocol'!
3SystemOrganization addCategory: #'Thrift-Test'!
4SystemOrganization addCategory: #'Thrift-Transport'!
5
6Error subclass: #TError
7 instanceVariableNames: 'code'
8 classVariableNames: ''
9 poolDictionaries: ''
10 category: 'Thrift'!
11
12!TError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:28'!
13signalWithCode: anInteger
14 self new code: anInteger; signal! !
15
16!TError methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:28'!
17code
18 ^ code! !
19
20!TError methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:28'!
21code: anInteger
22 code := anInteger! !
23
24TError subclass: #TProtocolError
25 instanceVariableNames: ''
26 classVariableNames: ''
27 poolDictionaries: ''
28 category: 'Thrift-Protocol'!
29
30!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:39'!
31badVersion
32 ^ 4! !
33
34!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:39'!
35invalidData
36 ^ 1! !
37
38!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:39'!
39negativeSize
40 ^ 2! !
41
42!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:40'!
43sizeLimit
44 ^ 3! !
45
46!TProtocolError class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:40'!
47unknown
48 ^ 0! !
49
50TError subclass: #TTransportError
51 instanceVariableNames: ''
52 classVariableNames: ''
53 poolDictionaries: ''
54 category: 'Thrift-Transport'!
55
56TTransportError subclass: #TTransportClosedError
57 instanceVariableNames: ''
58 classVariableNames: ''
59 poolDictionaries: ''
60 category: 'Thrift-Transport'!
61
62Error subclass: #Xception
63 instanceVariableNames: 'errorCode message'
64 classVariableNames: ''
65 poolDictionaries: ''
66 category: 'Thrift-Test'!
67
68!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
69errorCode
70 ^ errorCode! !
71
72!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
73errorCode: anI32
74 errorCode := anI32! !
75
76!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
77message
78 ^ message! !
79
80!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
81message: aString
82 message := aString! !
83
84Error subclass: #Xception2
85 instanceVariableNames: 'errorCode structThing'
86 classVariableNames: ''
87 poolDictionaries: ''
88 category: 'Thrift-Test'!
89
90!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
91errorCode
92 ^ errorCode! !
93
94!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
95errorCode: anI32
96 errorCode := anI32! !
97
98!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
99structThing
100 ^ structThing! !
101
102!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
103structThing: aXtruct
104 structThing := aXtruct! !
105
106Object subclass: #Bonk
107 instanceVariableNames: 'message type'
108 classVariableNames: ''
109 poolDictionaries: ''
110 category: 'Thrift-Test'!
111
112!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
113message
114 ^ message! !
115
116!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
117message: aString
118 message := aString! !
119
120!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
121type
122 ^ type! !
123
124!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
125type: anI32
126 type := anI32! !
127
128Object subclass: #EmptyStruct
129 instanceVariableNames: ''
130 classVariableNames: ''
131 poolDictionaries: ''
132 category: 'Thrift-Test'!
133
134Object subclass: #Insanity
135 instanceVariableNames: 'userMap xtructs'
136 classVariableNames: ''
137 poolDictionaries: ''
138 category: 'Thrift-Test'!
139
140!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
141userMap
142 ^ userMap! !
143
144!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
145userMap: a
146 userMap := a! !
147
148!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
149xtructs
150 ^ xtructs! !
151
152!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
153xtructs: a
154 xtructs := a! !
155
156Object subclass: #TClient
157 instanceVariableNames: 'iprot oprot seqid remoteSeqid'
158 classVariableNames: ''
159 poolDictionaries: ''
160 category: 'Thrift'!
161
162TClient subclass: #SecondServiceClient
163 instanceVariableNames: ''
164 classVariableNames: ''
165 poolDictionaries: ''
166 category: 'Thrift-Test'!
167
168!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
169blahBlah
170 ""
171 self sendBlahBlah.
172 ^ self recvBlahBlah success
173! !
174
175!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
176recvBlahBlah
177 | f msg res |
178 msg := oprot readMessageBegin.
179 self validateRemoteMessage: msg.
180 res := [|temp118 temp117|
181 temp117 := TResult new.
182 iprot readStructBegin.
183 [temp118 := iprot readFieldBegin.
184 temp118 type = TType stop] whileFalse: [|temp119|
185 temp118 id = 0 ifTrue: [
186 temp119 := true.
187 temp117 success: iprot readVoid].
188 temp119 ifNil: [iprot skip: temp118 type]].
189 oprot readStructEnd.
190 temp117] value.
191 oprot readMessageEnd.
192 oprot transport flush.
193 res exception ifNotNil: [res exception signal].
194 ^ res! !
195
196!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
197sendBlahBlah
198 oprot writeMessageBegin:
199 (TCallMessage new
200 name: 'blahBlah';
201 seqid: self nextSeqid).
202 oprot writeStructBegin: (TStruct new name: 'BlahBlah_args').
203 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
204 oprot transport flush! !
205
206!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 23:03'!
207inProtocol: aProtocol
208 iprot := aProtocol.
209 oprot ifNil: [oprot := aProtocol]! !
210
211!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 04:28'!
212nextSeqid
213 ^ seqid
214 ifNil: [seqid := 0]
215 ifNotNil: [seqid := seqid + 1]! !
216
217!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:51'!
218outProtocol: aProtocol
219 oprot := aProtocol! !
220
221!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/28/2007 15:32'!
222validateRemoteMessage: aMsg
223 remoteSeqid
224 ifNil: [remoteSeqid := aMsg seqid]
225 ifNotNil:
226 [(remoteSeqid + 1) = aMsg seqid ifFalse:
227 [TProtocolError signal: 'Bad seqid: ', aMsg seqid asString,
228 '; wanted: ', remoteSeqid asString].
229 remoteSeqid := aMsg seqid]! !
230
231TClient subclass: #ThriftTestClient
232 instanceVariableNames: ''
233 classVariableNames: ''
234 poolDictionaries: ''
235 category: 'Thrift-Test'!
236
237!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
238recvTestByte
239 | f msg res |
240 msg := oprot readMessageBegin.
241 self validateRemoteMessage: msg.
242 res := [|temp7 temp6|
243 temp6 := TResult new.
244 iprot readStructBegin.
245 [temp7 := iprot readFieldBegin.
246 temp7 type = TType stop] whileFalse: [|temp8|
247 temp7 id = 0 ifTrue: [
248 temp8 := true.
249 temp6 success: iprot readByte].
250 temp8 ifNil: [iprot skip: temp7 type]].
251 oprot readStructEnd.
252 temp6] value.
253 oprot readMessageEnd.
254 oprot transport flush.
255 res exception ifNotNil: [res exception signal].
256 ^ res! !
257
258!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
259recvTestDouble
260 | f msg res |
261 msg := oprot readMessageBegin.
262 self validateRemoteMessage: msg.
263 res := [|temp19 temp18|
264 temp18 := TResult new.
265 iprot readStructBegin.
266 [temp19 := iprot readFieldBegin.
267 temp19 type = TType stop] whileFalse: [|temp20|
268 temp19 id = 0 ifTrue: [
269 temp20 := true.
270 temp18 success: iprot readDouble].
271 temp20 ifNil: [iprot skip: temp19 type]].
272 oprot readStructEnd.
273 temp18] value.
274 oprot readMessageEnd.
275 oprot transport flush.
276 res exception ifNotNil: [res exception signal].
277 ^ res! !
278
279!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
280recvTestEnum
281 | f msg res |
282 msg := oprot readMessageBegin.
283 self validateRemoteMessage: msg.
284 res := [|temp56 temp55|
285 temp55 := TResult new.
286 iprot readStructBegin.
287 [temp56 := iprot readFieldBegin.
288 temp56 type = TType stop] whileFalse: [|temp57|
289 temp56 id = 0 ifTrue: [
290 temp57 := true.
291 temp55 success: iprot readI32].
292 temp57 ifNil: [iprot skip: temp56 type]].
293 oprot readStructEnd.
294 temp55] value.
295 oprot readMessageEnd.
296 oprot transport flush.
297 res exception ifNotNil: [res exception signal].
298 ^ res! !
299
300!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
301recvTestException
302 | f msg res |
303 msg := oprot readMessageBegin.
304 self validateRemoteMessage: msg.
305 res := [|temp97 temp96|
306 temp96 := TResult new.
307 iprot readStructBegin.
308 [temp97 := iprot readFieldBegin.
309 temp97 type = TType stop] whileFalse: [|temp98|
310 temp97 id = 0 ifTrue: [
311 temp98 := true.
312 temp96 success: iprot readVoid].
313 temp97 id = -2 ifTrue: [
314 temp98 := true.
315 temp96 exception: [|temp100 temp99|
316 temp99 := Xception new.
317 iprot readStructBegin.
318 [temp100 := iprot readFieldBegin.
319 temp100 type = TType stop] whileFalse: [|temp101|
320 temp100 id = 1 ifTrue: [
321 temp101 := true.
322 temp99 errorCode: iprot readI32].
323 temp100 id = 2 ifTrue: [
324 temp101 := true.
325 temp99 message: iprot readString].
326 temp101 ifNil: [iprot skip: temp100 type]].
327 oprot readStructEnd.
328 temp99] value].
329 temp98 ifNil: [iprot skip: temp97 type]].
330 oprot readStructEnd.
331 temp96] value.
332 oprot readMessageEnd.
333 oprot transport flush.
334 res exception ifNotNil: [res exception signal].
335 ^ res! !
336
337!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
338recvTestI16
339 | f msg res |
340 msg := oprot readMessageBegin.
341 self validateRemoteMessage: msg.
342 res := [|temp10 temp9|
343 temp9 := TResult new.
344 iprot readStructBegin.
345 [temp10 := iprot readFieldBegin.
346 temp10 type = TType stop] whileFalse: [|temp11|
347 temp10 id = 0 ifTrue: [
348 temp11 := true.
349 temp9 success: iprot readI16].
350 temp11 ifNil: [iprot skip: temp10 type]].
351 oprot readStructEnd.
352 temp9] value.
353 oprot readMessageEnd.
354 oprot transport flush.
355 res exception ifNotNil: [res exception signal].
356 ^ res! !
357
358!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
359recvTestI32
360 | f msg res |
361 msg := oprot readMessageBegin.
362 self validateRemoteMessage: msg.
363 res := [|temp13 temp12|
364 temp12 := TResult new.
365 iprot readStructBegin.
366 [temp13 := iprot readFieldBegin.
367 temp13 type = TType stop] whileFalse: [|temp14|
368 temp13 id = 0 ifTrue: [
369 temp14 := true.
370 temp12 success: iprot readI32].
371 temp14 ifNil: [iprot skip: temp13 type]].
372 oprot readStructEnd.
373 temp12] value.
374 oprot readMessageEnd.
375 oprot transport flush.
376 res exception ifNotNil: [res exception signal].
377 ^ res! !
378
379!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
380recvTestI64
381 | f msg res |
382 msg := oprot readMessageBegin.
383 self validateRemoteMessage: msg.
384 res := [|temp16 temp15|
385 temp15 := TResult new.
386 iprot readStructBegin.
387 [temp16 := iprot readFieldBegin.
388 temp16 type = TType stop] whileFalse: [|temp17|
389 temp16 id = 0 ifTrue: [
390 temp17 := true.
391 temp15 success: iprot readI64].
392 temp17 ifNil: [iprot skip: temp16 type]].
393 oprot readStructEnd.
394 temp15] value.
395 oprot readMessageEnd.
396 oprot transport flush.
397 res exception ifNotNil: [res exception signal].
398 ^ res! !
399
400!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
401recvTestInsanity
402 | f msg res |
403 msg := oprot readMessageBegin.
404 self validateRemoteMessage: msg.
405 res := [|temp72 temp71|
406 temp71 := TResult new.
407 iprot readStructBegin.
408 [temp72 := iprot readFieldBegin.
409 temp72 type = TType stop] whileFalse: [|temp73|
410 temp72 id = 0 ifTrue: [
411 temp73 := true.
412 temp71 success: [|temp74 temp75|
413 temp74 := iprot readMapBegin.
414 temp75 := Dictionary new.
415 temp74 size timesRepeat: [
416 temp75 at: iprot readI64 put: [|temp76 temp77|
417 temp76 := iprot readMapBegin.
418 temp77 := Dictionary new.
419 temp76 size timesRepeat: [
420 temp77 at: iprot readI32 put: [|temp79 temp78|
421 temp78 := Insanity new.
422 iprot readStructBegin.
423 [temp79 := iprot readFieldBegin.
424 temp79 type = TType stop] whileFalse: [|temp80|
425 temp79 id = 1 ifTrue: [
426 temp80 := true.
427 temp78 userMap: [|temp81 temp82|
428 temp81 := iprot readMapBegin.
429 temp82 := Dictionary new.
430 temp81 size timesRepeat: [
431 temp82 at: iprot readI32 put: iprot readI64].
432 iprot readMapEnd.
433 temp82] value].
434 temp79 id = 2 ifTrue: [
435 temp80 := true.
436 temp78 xtructs: [|temp83 temp84| temp83 := iprot readListBegin.
437 temp84 := OrderedCollection new.
438 temp83 size timesRepeat: [
439 temp84 add: [|temp86 temp85|
440 temp85 := Xtruct new.
441 iprot readStructBegin.
442 [temp86 := iprot readFieldBegin.
443 temp86 type = TType stop] whileFalse: [|temp87|
444 temp86 id = 1 ifTrue: [
445 temp87 := true.
446 temp85 stringThing: iprot readString].
447 temp86 id = 4 ifTrue: [
448 temp87 := true.
449 temp85 byteThing: iprot readByte].
450 temp86 id = 9 ifTrue: [
451 temp87 := true.
452 temp85 i32Thing: iprot readI32].
453 temp86 id = 11 ifTrue: [
454 temp87 := true.
455 temp85 i64Thing: iprot readI64].
456 temp87 ifNil: [iprot skip: temp86 type]].
457 oprot readStructEnd.
458 temp85] value].
459 iprot readListEnd.
460 temp84] value].
461 temp80 ifNil: [iprot skip: temp79 type]].
462 oprot readStructEnd.
463 temp78] value].
464 iprot readMapEnd.
465 temp77] value].
466 iprot readMapEnd.
467 temp75] value].
468 temp73 ifNil: [iprot skip: temp72 type]].
469 oprot readStructEnd.
470 temp71] value.
471 oprot readMessageEnd.
472 oprot transport flush.
473 res exception ifNotNil: [res exception signal].
474 ^ res! !
475
476!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
477recvTestList
478 | f msg res |
479 msg := oprot readMessageBegin.
480 self validateRemoteMessage: msg.
481 res := [|temp51 temp50|
482 temp50 := TResult new.
483 iprot readStructBegin.
484 [temp51 := iprot readFieldBegin.
485 temp51 type = TType stop] whileFalse: [|temp52|
486 temp51 id = 0 ifTrue: [
487 temp52 := true.
488 temp50 success: [|temp53 temp54| temp53 := iprot readListBegin.
489 temp54 := OrderedCollection new.
490 temp53 size timesRepeat: [
491 temp54 add: iprot readI32].
492 iprot readListEnd.
493 temp54] value].
494 temp52 ifNil: [iprot skip: temp51 type]].
495 oprot readStructEnd.
496 temp50] value.
497 oprot readMessageEnd.
498 oprot transport flush.
499 res exception ifNotNil: [res exception signal].
500 ^ res! !
501
502!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
503recvTestMap
504 | f msg res |
505 msg := oprot readMessageBegin.
506 self validateRemoteMessage: msg.
507 res := [|temp39 temp38|
508 temp38 := TResult new.
509 iprot readStructBegin.
510 [temp39 := iprot readFieldBegin.
511 temp39 type = TType stop] whileFalse: [|temp40|
512 temp39 id = 0 ifTrue: [
513 temp40 := true.
514 temp38 success: [|temp41 temp42|
515 temp41 := iprot readMapBegin.
516 temp42 := Dictionary new.
517 temp41 size timesRepeat: [
518 temp42 at: iprot readI32 put: iprot readI32].
519 iprot readMapEnd.
520 temp42] value].
521 temp40 ifNil: [iprot skip: temp39 type]].
522 oprot readStructEnd.
523 temp38] value.
524 oprot readMessageEnd.
525 oprot transport flush.
526 res exception ifNotNil: [res exception signal].
527 ^ res! !
528
529!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
530recvTestMapMap
531 | f msg res |
532 msg := oprot readMessageBegin.
533 self validateRemoteMessage: msg.
534 res := [|temp62 temp61|
535 temp61 := TResult new.
536 iprot readStructBegin.
537 [temp62 := iprot readFieldBegin.
538 temp62 type = TType stop] whileFalse: [|temp63|
539 temp62 id = 0 ifTrue: [
540 temp63 := true.
541 temp61 success: [|temp64 temp65|
542 temp64 := iprot readMapBegin.
543 temp65 := Dictionary new.
544 temp64 size timesRepeat: [
545 temp65 at: iprot readI32 put: [|temp66 temp67|
546 temp66 := iprot readMapBegin.
547 temp67 := Dictionary new.
548 temp66 size timesRepeat: [
549 temp67 at: iprot readI32 put: iprot readI32].
550 iprot readMapEnd.
551 temp67] value].
552 iprot readMapEnd.
553 temp65] value].
554 temp63 ifNil: [iprot skip: temp62 type]].
555 oprot readStructEnd.
556 temp61] value.
557 oprot readMessageEnd.
558 oprot transport flush.
559 res exception ifNotNil: [res exception signal].
560 ^ res! !
561
562!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
563recvTestMulti
564 | f msg res |
565 msg := oprot readMessageBegin.
566 self validateRemoteMessage: msg.
567 res := [|temp91 temp90|
568 temp90 := TResult new.
569 iprot readStructBegin.
570 [temp91 := iprot readFieldBegin.
571 temp91 type = TType stop] whileFalse: [|temp92|
572 temp91 id = 0 ifTrue: [
573 temp92 := true.
574 temp90 success: [|temp94 temp93|
575 temp93 := Xtruct new.
576 iprot readStructBegin.
577 [temp94 := iprot readFieldBegin.
578 temp94 type = TType stop] whileFalse: [|temp95|
579 temp94 id = 1 ifTrue: [
580 temp95 := true.
581 temp93 stringThing: iprot readString].
582 temp94 id = 4 ifTrue: [
583 temp95 := true.
584 temp93 byteThing: iprot readByte].
585 temp94 id = 9 ifTrue: [
586 temp95 := true.
587 temp93 i32Thing: iprot readI32].
588 temp94 id = 11 ifTrue: [
589 temp95 := true.
590 temp93 i64Thing: iprot readI64].
591 temp95 ifNil: [iprot skip: temp94 type]].
592 oprot readStructEnd.
593 temp93] value].
594 temp92 ifNil: [iprot skip: temp91 type]].
595 oprot readStructEnd.
596 temp90] value.
597 oprot readMessageEnd.
598 oprot transport flush.
599 res exception ifNotNil: [res exception signal].
600 ^ res! !
601
602!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
603recvTestMultiException
604 | f msg res |
605 msg := oprot readMessageBegin.
606 self validateRemoteMessage: msg.
607 res := [|temp103 temp102|
608 temp102 := TResult new.
609 iprot readStructBegin.
610 [temp103 := iprot readFieldBegin.
611 temp103 type = TType stop] whileFalse: [|temp104|
612 temp103 id = 0 ifTrue: [
613 temp104 := true.
614 temp102 success: [|temp106 temp105|
615 temp105 := Xtruct new.
616 iprot readStructBegin.
617 [temp106 := iprot readFieldBegin.
618 temp106 type = TType stop] whileFalse: [|temp107|
619 temp106 id = 1 ifTrue: [
620 temp107 := true.
621 temp105 stringThing: iprot readString].
622 temp106 id = 4 ifTrue: [
623 temp107 := true.
624 temp105 byteThing: iprot readByte].
625 temp106 id = 9 ifTrue: [
626 temp107 := true.
627 temp105 i32Thing: iprot readI32].
628 temp106 id = 11 ifTrue: [
629 temp107 := true.
630 temp105 i64Thing: iprot readI64].
631 temp107 ifNil: [iprot skip: temp106 type]].
632 oprot readStructEnd.
633 temp105] value].
634 temp103 id = -3 ifTrue: [
635 temp104 := true.
636 temp102 exception: [|temp109 temp108|
637 temp108 := Xception new.
638 iprot readStructBegin.
639 [temp109 := iprot readFieldBegin.
640 temp109 type = TType stop] whileFalse: [|temp110|
641 temp109 id = 1 ifTrue: [
642 temp110 := true.
643 temp108 errorCode: iprot readI32].
644 temp109 id = 2 ifTrue: [
645 temp110 := true.
646 temp108 message: iprot readString].
647 temp110 ifNil: [iprot skip: temp109 type]].
648 oprot readStructEnd.
649 temp108] value].
650 temp103 id = -4 ifTrue: [
651 temp104 := true.
652 temp102 exception: [|temp112 temp111|
653 temp111 := Xception2 new.
654 iprot readStructBegin.
655 [temp112 := iprot readFieldBegin.
656 temp112 type = TType stop] whileFalse: [|temp113|
657 temp112 id = 1 ifTrue: [
658 temp113 := true.
659 temp111 errorCode: iprot readI32].
660 temp112 id = 2 ifTrue: [
661 temp113 := true.
662 temp111 structThing: [|temp115 temp114|
663 temp114 := Xtruct new.
664 iprot readStructBegin.
665 [temp115 := iprot readFieldBegin.
666 temp115 type = TType stop] whileFalse: [|temp116|
667 temp115 id = 1 ifTrue: [
668 temp116 := true.
669 temp114 stringThing: iprot readString].
670 temp115 id = 4 ifTrue: [
671 temp116 := true.
672 temp114 byteThing: iprot readByte].
673 temp115 id = 9 ifTrue: [
674 temp116 := true.
675 temp114 i32Thing: iprot readI32].
676 temp115 id = 11 ifTrue: [
677 temp116 := true.
678 temp114 i64Thing: iprot readI64].
679 temp116 ifNil: [iprot skip: temp115 type]].
680 oprot readStructEnd.
681 temp114] value].
682 temp113 ifNil: [iprot skip: temp112 type]].
683 oprot readStructEnd.
684 temp111] value].
685 temp104 ifNil: [iprot skip: temp103 type]].
686 oprot readStructEnd.
687 temp102] value.
688 oprot readMessageEnd.
689 oprot transport flush.
690 res exception ifNotNil: [res exception signal].
691 ^ res! !
692
693!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
694recvTestNest
695 | f msg res |
696 msg := oprot readMessageBegin.
697 self validateRemoteMessage: msg.
698 res := [|temp28 temp27|
699 temp27 := TResult new.
700 iprot readStructBegin.
701 [temp28 := iprot readFieldBegin.
702 temp28 type = TType stop] whileFalse: [|temp29|
703 temp28 id = 0 ifTrue: [
704 temp29 := true.
705 temp27 success: [|temp31 temp30|
706 temp30 := Xtruct2 new.
707 iprot readStructBegin.
708 [temp31 := iprot readFieldBegin.
709 temp31 type = TType stop] whileFalse: [|temp32|
710 temp31 id = 1 ifTrue: [
711 temp32 := true.
712 temp30 byteThing: iprot readByte].
713 temp31 id = 2 ifTrue: [
714 temp32 := true.
715 temp30 structThing: [|temp34 temp33|
716 temp33 := Xtruct new.
717 iprot readStructBegin.
718 [temp34 := iprot readFieldBegin.
719 temp34 type = TType stop] whileFalse: [|temp35|
720 temp34 id = 1 ifTrue: [
721 temp35 := true.
722 temp33 stringThing: iprot readString].
723 temp34 id = 4 ifTrue: [
724 temp35 := true.
725 temp33 byteThing: iprot readByte].
726 temp34 id = 9 ifTrue: [
727 temp35 := true.
728 temp33 i32Thing: iprot readI32].
729 temp34 id = 11 ifTrue: [
730 temp35 := true.
731 temp33 i64Thing: iprot readI64].
732 temp35 ifNil: [iprot skip: temp34 type]].
733 oprot readStructEnd.
734 temp33] value].
735 temp31 id = 3 ifTrue: [
736 temp32 := true.
737 temp30 i32Thing: iprot readI32].
738 temp32 ifNil: [iprot skip: temp31 type]].
739 oprot readStructEnd.
740 temp30] value].
741 temp29 ifNil: [iprot skip: temp28 type]].
742 oprot readStructEnd.
743 temp27] value.
744 oprot readMessageEnd.
745 oprot transport flush.
746 res exception ifNotNil: [res exception signal].
747 ^ res! !
748
749!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
750recvTestSet
751 | f msg res |
752 msg := oprot readMessageBegin.
753 self validateRemoteMessage: msg.
754 res := [|temp45 temp44|
755 temp44 := TResult new.
756 iprot readStructBegin.
757 [temp45 := iprot readFieldBegin.
758 temp45 type = TType stop] whileFalse: [|temp46|
759 temp45 id = 0 ifTrue: [
760 temp46 := true.
761 temp44 success: [|temp47 temp48| temp47 := iprot readSetBegin.
762 temp48 := Set new.
763 temp47 size timesRepeat: [
764 temp48 add: iprot readI32].
765 iprot readSetEnd.
766 temp48] value].
767 temp46 ifNil: [iprot skip: temp45 type]].
768 oprot readStructEnd.
769 temp44] value.
770 oprot readMessageEnd.
771 oprot transport flush.
772 res exception ifNotNil: [res exception signal].
773 ^ res! !
774
775!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
776recvTestString
777 | f msg res |
778 msg := oprot readMessageBegin.
779 self validateRemoteMessage: msg.
780 res := [|temp4 temp3|
781 temp3 := TResult new.
782 iprot readStructBegin.
783 [temp4 := iprot readFieldBegin.
784 temp4 type = TType stop] whileFalse: [|temp5|
785 temp4 id = 0 ifTrue: [
786 temp5 := true.
787 temp3 success: iprot readString].
788 temp5 ifNil: [iprot skip: temp4 type]].
789 oprot readStructEnd.
790 temp3] value.
791 oprot readMessageEnd.
792 oprot transport flush.
793 res exception ifNotNil: [res exception signal].
794 ^ res! !
795
796!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
797recvTestStruct
798 | f msg res |
799 msg := oprot readMessageBegin.
800 self validateRemoteMessage: msg.
801 res := [|temp22 temp21|
802 temp21 := TResult new.
803 iprot readStructBegin.
804 [temp22 := iprot readFieldBegin.
805 temp22 type = TType stop] whileFalse: [|temp23|
806 temp22 id = 0 ifTrue: [
807 temp23 := true.
808 temp21 success: [|temp25 temp24|
809 temp24 := Xtruct new.
810 iprot readStructBegin.
811 [temp25 := iprot readFieldBegin.
812 temp25 type = TType stop] whileFalse: [|temp26|
813 temp25 id = 1 ifTrue: [
814 temp26 := true.
815 temp24 stringThing: iprot readString].
816 temp25 id = 4 ifTrue: [
817 temp26 := true.
818 temp24 byteThing: iprot readByte].
819 temp25 id = 9 ifTrue: [
820 temp26 := true.
821 temp24 i32Thing: iprot readI32].
822 temp25 id = 11 ifTrue: [
823 temp26 := true.
824 temp24 i64Thing: iprot readI64].
825 temp26 ifNil: [iprot skip: temp25 type]].
826 oprot readStructEnd.
827 temp24] value].
828 temp23 ifNil: [iprot skip: temp22 type]].
829 oprot readStructEnd.
830 temp21] value.
831 oprot readMessageEnd.
832 oprot transport flush.
833 res exception ifNotNil: [res exception signal].
834 ^ res! !
835
836!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
837recvTestTypedef
838 | f msg res |
839 msg := oprot readMessageBegin.
840 self validateRemoteMessage: msg.
841 res := [|temp59 temp58|
842 temp58 := TResult new.
843 iprot readStructBegin.
844 [temp59 := iprot readFieldBegin.
845 temp59 type = TType stop] whileFalse: [|temp60|
846 temp59 id = 0 ifTrue: [
847 temp60 := true.
848 temp58 success: iprot readI64].
849 temp60 ifNil: [iprot skip: temp59 type]].
850 oprot readStructEnd.
851 temp58] value.
852 oprot readMessageEnd.
853 oprot transport flush.
854 res exception ifNotNil: [res exception signal].
855 ^ res! !
856
857!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
858recvTestVoid
859 | f msg res |
860 msg := oprot readMessageBegin.
861 self validateRemoteMessage: msg.
862 res := [|temp1 temp0|
863 temp0 := TResult new.
864 iprot readStructBegin.
865 [temp1 := iprot readFieldBegin.
866 temp1 type = TType stop] whileFalse: [|temp2|
867 temp1 id = 0 ifTrue: [
868 temp2 := true.
869 temp0 success: iprot readVoid].
870 temp2 ifNil: [iprot skip: temp1 type]].
871 oprot readStructEnd.
872 temp0] value.
873 oprot readMessageEnd.
874 oprot transport flush.
875 res exception ifNotNil: [res exception signal].
876 ^ res! !
877
878!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
879sendTestByteThing: thing
880 oprot writeMessageBegin:
881 (TCallMessage new
882 name: 'testByte';
883 seqid: self nextSeqid).
884 oprot writeStructBegin: (TStruct new name: 'TestByte_args').
885 oprot writeFieldBegin: (TField new name: 'thing'; type: TType byte; id: 1).
886 iprot writeByte: thing asInteger.
887 oprot writeFieldEnd.
888 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
889 oprot transport flush! !
890
891!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
892sendTestDoubleThing: thing
893 oprot writeMessageBegin:
894 (TCallMessage new
895 name: 'testDouble';
896 seqid: self nextSeqid).
897 oprot writeStructBegin: (TStruct new name: 'TestDouble_args').
898 oprot writeFieldBegin: (TField new name: 'thing'; type: TType double; id: 1).
899 iprot writeDouble: thing asFloat.
900 oprot writeFieldEnd.
901 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
902 oprot transport flush! !
903
904!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
905sendTestEnumThing: thing
906 oprot writeMessageBegin:
907 (TCallMessage new
908 name: 'testEnum';
909 seqid: self nextSeqid).
910 oprot writeStructBegin: (TStruct new name: 'TestEnum_args').
911 oprot writeFieldBegin: (TField new name: 'thing'; type: TType i32; id: 1).
912 iprot writeI32: thing.
913 oprot writeFieldEnd.
914 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
915 oprot transport flush! !
916
917!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
918sendTestExceptionArg: arg
919 oprot writeMessageBegin:
920 (TCallMessage new
921 name: 'testException';
922 seqid: self nextSeqid).
923 oprot writeStructBegin: (TStruct new name: 'TestException_args').
924 oprot writeFieldBegin: (TField new name: 'arg'; type: TType string; id: -1).
925 iprot writeString: arg.
926 oprot writeFieldEnd.
927 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
928 oprot transport flush! !
929
930!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
931sendTestI16Thing: thing
932 oprot writeMessageBegin:
933 (TCallMessage new
934 name: 'testI16';
935 seqid: self nextSeqid).
936 oprot writeStructBegin: (TStruct new name: 'TestI16_args').
937 oprot writeFieldBegin: (TField new name: 'thing'; type: TType i16; id: 1).
938 iprot writeI16: thing asInteger.
939 oprot writeFieldEnd.
940 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
941 oprot transport flush! !
942
943!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
944sendTestI32Thing: thing
945 oprot writeMessageBegin:
946 (TCallMessage new
947 name: 'testI32';
948 seqid: self nextSeqid).
949 oprot writeStructBegin: (TStruct new name: 'TestI32_args').
950 oprot writeFieldBegin: (TField new name: 'thing'; type: TType i32; id: 1).
951 iprot writeI32: thing asInteger.
952 oprot writeFieldEnd.
953 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
954 oprot transport flush! !
955
956!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
957sendTestI64Thing: thing
958 oprot writeMessageBegin:
959 (TCallMessage new
960 name: 'testI64';
961 seqid: self nextSeqid).
962 oprot writeStructBegin: (TStruct new name: 'TestI64_args').
963 oprot writeFieldBegin: (TField new name: 'thing'; type: TType i64; id: 1).
964 iprot writeI64: thing asInteger.
965 oprot writeFieldEnd.
966 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
967 oprot transport flush! !
968
969!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
970sendTestInsanityArgument: argument
971 oprot writeMessageBegin:
972 (TCallMessage new
973 name: 'testInsanity';
974 seqid: self nextSeqid).
975 oprot writeStructBegin: (TStruct new name: 'TestInsanity_args').
976 oprot writeFieldBegin: (TField new name: 'argument'; type: TType struct; id: 1).
977 [oprot writeStructBegin: (TStruct new name: 'Insanity').
978 oprot writeFieldBegin: (TField new name: 'userMap'; type: TType map; id: 1).
979 [oprot writeMapBegin: (TMap new keyType: TType i32; valueType: TType i64; size: argument userMap size).
980 argument userMap keysAndValuesDo: [:temp68 :temp69 |
981 iprot writeI32: temp68.
982 iprot writeI64: temp69 asInteger].
983 oprot writeMapEnd] value.
984 oprot writeFieldEnd.
985 oprot writeFieldBegin: (TField new name: 'xtructs'; type: TType list; id: 2).
986 [oprot writeListBegin: (TList new elemType: TType struct; size: argument xtructs size).
987 argument xtructs do: [:temp70|
988 [oprot writeStructBegin: (TStruct new name: 'Xtruct').
989 oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
990 iprot writeString: temp70 stringThing.
991 oprot writeFieldEnd.
992 oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
993 iprot writeByte: temp70 byteThing asInteger.
994 oprot writeFieldEnd.
995 oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
996 iprot writeI32: temp70 i32Thing asInteger.
997 oprot writeFieldEnd.
998 oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
999 iprot writeI64: temp70 i64Thing asInteger.
1000 oprot writeFieldEnd.
1001 oprot writeFieldStop; writeStructEnd] value
1002].
1003 oprot writeListEnd] value.
1004 oprot writeFieldEnd.
1005 oprot writeFieldStop; writeStructEnd] value.
1006 oprot writeFieldEnd.
1007 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1008 oprot transport flush! !
1009
1010!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1011sendTestListThing: thing
1012 oprot writeMessageBegin:
1013 (TCallMessage new
1014 name: 'testList';
1015 seqid: self nextSeqid).
1016 oprot writeStructBegin: (TStruct new name: 'TestList_args').
1017 oprot writeFieldBegin: (TField new name: 'thing'; type: TType list; id: 1).
1018 [oprot writeListBegin: (TList new elemType: TType i32; size: thing size).
1019 thing do: [:temp49|
1020 iprot writeI32: temp49 asInteger
1021].
1022 oprot writeListEnd] value.
1023 oprot writeFieldEnd.
1024 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1025 oprot transport flush! !
1026
1027!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1028sendTestMapMapHello: hello
1029 oprot writeMessageBegin:
1030 (TCallMessage new
1031 name: 'testMapMap';
1032 seqid: self nextSeqid).
1033 oprot writeStructBegin: (TStruct new name: 'TestMapMap_args').
1034 oprot writeFieldBegin: (TField new name: 'hello'; type: TType i32; id: 1).
1035 iprot writeI32: hello asInteger.
1036 oprot writeFieldEnd.
1037 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1038 oprot transport flush! !
1039
1040!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1041sendTestMapThing: thing
1042 oprot writeMessageBegin:
1043 (TCallMessage new
1044 name: 'testMap';
1045 seqid: self nextSeqid).
1046 oprot writeStructBegin: (TStruct new name: 'TestMap_args').
1047 oprot writeFieldBegin: (TField new name: 'thing'; type: TType map; id: 1).
1048 [oprot writeMapBegin: (TMap new keyType: TType i32; valueType: TType i32; size: thing size).
1049 thing keysAndValuesDo: [:temp36 :temp37 |
1050 iprot writeI32: temp36 asInteger.
1051 iprot writeI32: temp37 asInteger].
1052 oprot writeMapEnd] value.
1053 oprot writeFieldEnd.
1054 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1055 oprot transport flush! !
1056
1057!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1058sendTestMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5
1059 oprot writeMessageBegin:
1060 (TCallMessage new
1061 name: 'testMulti';
1062 seqid: self nextSeqid).
1063 oprot writeStructBegin: (TStruct new name: 'TestMulti_args').
1064 oprot writeFieldBegin: (TField new name: 'arg0'; type: TType byte; id: -1).
1065 iprot writeByte: arg0 asInteger.
1066 oprot writeFieldEnd.
1067 oprot writeFieldBegin: (TField new name: 'arg1'; type: TType i32; id: -2).
1068 iprot writeI32: arg1 asInteger.
1069 oprot writeFieldEnd.
1070 oprot writeFieldBegin: (TField new name: 'arg2'; type: TType i64; id: -3).
1071 iprot writeI64: arg2 asInteger.
1072 oprot writeFieldEnd.
1073 oprot writeFieldBegin: (TField new name: 'arg3'; type: TType map; id: -4).
1074 [oprot writeMapBegin: (TMap new keyType: TType i16; valueType: TType string; size: arg3 size).
1075 arg3 keysAndValuesDo: [:temp88 :temp89 |
1076 iprot writeI16: temp88 asInteger.
1077 iprot writeString: temp89].
1078 oprot writeMapEnd] value.
1079 oprot writeFieldEnd.
1080 oprot writeFieldBegin: (TField new name: 'arg4'; type: TType i32; id: -5).
1081 iprot writeI32: arg4.
1082 oprot writeFieldEnd.
1083 oprot writeFieldBegin: (TField new name: 'arg5'; type: TType i64; id: -6).
1084 iprot writeI64: arg5 asInteger.
1085 oprot writeFieldEnd.
1086 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1087 oprot transport flush! !
1088
1089!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1090sendTestMultiExceptionArg0: arg0 arg1: arg1
1091 oprot writeMessageBegin:
1092 (TCallMessage new
1093 name: 'testMultiException';
1094 seqid: self nextSeqid).
1095 oprot writeStructBegin: (TStruct new name: 'TestMultiException_args').
1096 oprot writeFieldBegin: (TField new name: 'arg0'; type: TType string; id: -1).
1097 iprot writeString: arg0.
1098 oprot writeFieldEnd.
1099 oprot writeFieldBegin: (TField new name: 'arg1'; type: TType string; id: -2).
1100 iprot writeString: arg1.
1101 oprot writeFieldEnd.
1102 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1103 oprot transport flush! !
1104
1105!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1106sendTestNestThing: thing
1107 oprot writeMessageBegin:
1108 (TCallMessage new
1109 name: 'testNest';
1110 seqid: self nextSeqid).
1111 oprot writeStructBegin: (TStruct new name: 'TestNest_args').
1112 oprot writeFieldBegin: (TField new name: 'thing'; type: TType struct; id: 1).
1113 [oprot writeStructBegin: (TStruct new name: 'Xtruct2').
1114 oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 1).
1115 iprot writeByte: thing byteThing asInteger.
1116 oprot writeFieldEnd.
1117 oprot writeFieldBegin: (TField new name: 'struct_thing'; type: TType struct; id: 2).
1118 [oprot writeStructBegin: (TStruct new name: 'Xtruct').
1119 oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
1120 iprot writeString: thing structThing stringThing.
1121 oprot writeFieldEnd.
1122 oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
1123 iprot writeByte: thing structThing byteThing asInteger.
1124 oprot writeFieldEnd.
1125 oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
1126 iprot writeI32: thing structThing i32Thing asInteger.
1127 oprot writeFieldEnd.
1128 oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
1129 iprot writeI64: thing structThing i64Thing asInteger.
1130 oprot writeFieldEnd.
1131 oprot writeFieldStop; writeStructEnd] value.
1132 oprot writeFieldEnd.
1133 oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 3).
1134 iprot writeI32: thing i32Thing asInteger.
1135 oprot writeFieldEnd.
1136 oprot writeFieldStop; writeStructEnd] value.
1137 oprot writeFieldEnd.
1138 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1139 oprot transport flush! !
1140
1141!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1142sendTestSetThing: thing
1143 oprot writeMessageBegin:
1144 (TCallMessage new
1145 name: 'testSet';
1146 seqid: self nextSeqid).
1147 oprot writeStructBegin: (TStruct new name: 'TestSet_args').
1148 oprot writeFieldBegin: (TField new name: 'thing'; type: TType set; id: 1).
1149 [oprot writeSetBegin: (TSet new elemType: TType i32; size: thing size).
1150 thing do: [:temp43|
1151 iprot writeI32: temp43 asInteger
1152].
1153 oprot writeSetEnd] value.
1154 oprot writeFieldEnd.
1155 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1156 oprot transport flush! !
1157
1158!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1159sendTestStringThing: thing
1160 oprot writeMessageBegin:
1161 (TCallMessage new
1162 name: 'testString';
1163 seqid: self nextSeqid).
1164 oprot writeStructBegin: (TStruct new name: 'TestString_args').
1165 oprot writeFieldBegin: (TField new name: 'thing'; type: TType string; id: 1).
1166 iprot writeString: thing.
1167 oprot writeFieldEnd.
1168 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1169 oprot transport flush! !
1170
1171!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1172sendTestStructThing: thing
1173 oprot writeMessageBegin:
1174 (TCallMessage new
1175 name: 'testStruct';
1176 seqid: self nextSeqid).
1177 oprot writeStructBegin: (TStruct new name: 'TestStruct_args').
1178 oprot writeFieldBegin: (TField new name: 'thing'; type: TType struct; id: 1).
1179 [oprot writeStructBegin: (TStruct new name: 'Xtruct').
1180 oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
1181 iprot writeString: thing stringThing.
1182 oprot writeFieldEnd.
1183 oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
1184 iprot writeByte: thing byteThing asInteger.
1185 oprot writeFieldEnd.
1186 oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
1187 iprot writeI32: thing i32Thing asInteger.
1188 oprot writeFieldEnd.
1189 oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
1190 iprot writeI64: thing i64Thing asInteger.
1191 oprot writeFieldEnd.
1192 oprot writeFieldStop; writeStructEnd] value.
1193 oprot writeFieldEnd.
1194 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1195 oprot transport flush! !
1196
1197!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1198sendTestTypedefThing: thing
1199 oprot writeMessageBegin:
1200 (TCallMessage new
1201 name: 'testTypedef';
1202 seqid: self nextSeqid).
1203 oprot writeStructBegin: (TStruct new name: 'TestTypedef_args').
1204 oprot writeFieldBegin: (TField new name: 'thing'; type: TType i64; id: 1).
1205 iprot writeI64: thing asInteger.
1206 oprot writeFieldEnd.
1207 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1208 oprot transport flush! !
1209
1210!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1211sendTestVoid
1212 oprot writeMessageBegin:
1213 (TCallMessage new
1214 name: 'testVoid';
1215 seqid: self nextSeqid).
1216 oprot writeStructBegin: (TStruct new name: 'TestVoid_args').
1217 oprot writeFieldStop; writeStructEnd; writeMessageEnd.
1218 oprot transport flush! !
1219
1220!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1221testByteThing: thing
1222 "thing: byte"
1223 self sendTestByteThing: thing.
1224 ^ self recvTestByte success
1225! !
1226
1227!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1228testDoubleThing: thing
1229 "thing: double"
1230 self sendTestDoubleThing: thing.
1231 ^ self recvTestDouble success
1232! !
1233
1234!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1235testEnumThing: thing
1236 "thing: Numberz"
1237 self sendTestEnumThing: thing.
1238 ^ self recvTestEnum success
1239! !
1240
1241!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1242testExceptionArg: arg
1243 "arg: string"
1244 self sendTestExceptionArg: arg.
1245 ^ self recvTestException success
1246! !
1247
1248!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1249testI16Thing: thing
1250 "thing: i16"
1251 self sendTestI16Thing: thing.
1252 ^ self recvTestI16 success
1253! !
1254
1255!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1256testI32Thing: thing
1257 "thing: i32"
1258 self sendTestI32Thing: thing.
1259 ^ self recvTestI32 success
1260! !
1261
1262!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1263testI64Thing: thing
1264 "thing: i64"
1265 self sendTestI64Thing: thing.
1266 ^ self recvTestI64 success
1267! !
1268
1269!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1270testInsanityArgument: argument
1271 "argument: Insanity"
1272 self sendTestInsanityArgument: argument.
1273 ^ self recvTestInsanity success
1274! !
1275
1276!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1277testListThing: thing
1278 "thing: "
1279 self sendTestListThing: thing.
1280 ^ self recvTestList success
1281! !
1282
1283!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1284testMapMapHello: hello
1285 "hello: i32"
1286 self sendTestMapMapHello: hello.
1287 ^ self recvTestMapMap success
1288! !
1289
1290!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1291testMapThing: thing
1292 "thing: "
1293 self sendTestMapThing: thing.
1294 ^ self recvTestMap success
1295! !
1296
1297!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1298testMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5
1299 "arg0: byte, arg1: i32, arg2: i64, arg3: , arg4: Numberz, arg5: UserId"
1300 self sendTestMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5.
1301 ^ self recvTestMulti success
1302! !
1303
1304!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1305testMultiExceptionArg0: arg0 arg1: arg1
1306 "arg0: string, arg1: string"
1307 self sendTestMultiExceptionArg0: arg0 arg1: arg1.
1308 ^ self recvTestMultiException success
1309! !
1310
1311!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1312testNestThing: thing
1313 "thing: Xtruct2"
1314 self sendTestNestThing: thing.
1315 ^ self recvTestNest success
1316! !
1317
1318!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1319testSetThing: thing
1320 "thing: "
1321 self sendTestSetThing: thing.
1322 ^ self recvTestSet success
1323! !
1324
1325!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1326testStringThing: thing
1327 "thing: string"
1328 self sendTestStringThing: thing.
1329 ^ self recvTestString success
1330! !
1331
1332!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1333testStructThing: thing
1334 "thing: Xtruct"
1335 self sendTestStructThing: thing.
1336 ^ self recvTestStruct success
1337! !
1338
1339!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1340testTypedefThing: thing
1341 "thing: UserId"
1342 self sendTestTypedefThing: thing.
1343 ^ self recvTestTypedef success
1344! !
1345
1346!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
1347testVoid
1348 ""
1349 self sendTestVoid.
1350 ^ self recvTestVoid success
1351! !
1352
1353Object subclass: #TField
1354 instanceVariableNames: 'name type id'
1355 classVariableNames: ''
1356 poolDictionaries: ''
1357 category: 'Thrift-Protocol'!
1358
1359!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:05'!
1360id
1361 ^ id ifNil: [0]! !
1362
1363!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:44'!
1364id: anInteger
1365 id := anInteger! !
1366
1367!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:04'!
1368name
1369 ^ name ifNil: ['']! !
1370
1371!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:44'!
1372name: anObject
1373 name := anObject! !
1374
1375!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:05'!
1376type
1377 ^ type ifNil: [TType stop]! !
1378
1379!TField methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:44'!
1380type: anInteger
1381 type := anInteger! !
1382
1383Object subclass: #TMessage
1384 instanceVariableNames: 'name seqid type'
1385 classVariableNames: ''
1386 poolDictionaries: ''
1387 category: 'Thrift-Protocol'!
1388
1389TMessage subclass: #TCallMessage
1390 instanceVariableNames: ''
1391 classVariableNames: ''
1392 poolDictionaries: ''
1393 category: 'Thrift-Protocol'!
1394
1395!TCallMessage methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:53'!
1396type
1397 ^ 1! !
1398
1399!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:05'!
1400name
1401 ^ name ifNil: ['']! !
1402
1403!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:35'!
1404name: aString
1405 name := aString! !
1406
1407!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:05'!
1408seqid
1409 ^ seqid ifNil: [0]! !
1410
1411!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:35'!
1412seqid: anInteger
1413 seqid := anInteger! !
1414
1415!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:06'!
1416type
1417 ^ type ifNil: [0]! !
1418
1419!TMessage methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:35'!
1420type: anInteger
1421 type := anInteger! !
1422
1423Object subclass: #TProtocol
1424 instanceVariableNames: 'transport'
1425 classVariableNames: ''
1426 poolDictionaries: ''
1427 category: 'Thrift-Protocol'!
1428
1429TProtocol subclass: #TBinaryProtocol
1430 instanceVariableNames: ''
1431 classVariableNames: ''
1432 poolDictionaries: ''
1433 category: 'Thrift-Protocol'!
1434
1435!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 04:24'!
1436intFromByteArray: buf
1437 | vals |
1438 vals := Array new: buf size.
1439 1 to: buf size do: [:n | vals at: n put: ((buf at: n) bitShift: (buf size - n) * 8)].
1440 ^ vals sum! !
1441
1442!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 18:46'!
1443readBool
1444 ^ self readByte isZero not! !
1445
1446!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/25/2007 00:02'!
1447readByte
1448 ^ (self transport read: 1) first! !
1449
1450!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/28/2007 16:24'!
1451readDouble
1452 | val |
1453 val := Float new: 2.
1454 ^ val basicAt: 1 put: (self readRawInt: 4);
1455 basicAt: 2 put: (self readRawInt: 4);
1456 yourself! !
1457
1458!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 20:02'!
1459readFieldBegin
1460 | field |
1461 field := TField new type: self readByte.
1462
1463 ^ field type = TType stop
1464 ifTrue: [field]
1465 ifFalse: [field id: self readI16; yourself]! !
1466
1467!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:15'!
1468readI16
1469 ^ self readInt: 2! !
1470
1471!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:20'!
1472readI32
1473 ^ self readInt: 4! !
1474
1475!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:20'!
1476readI64
1477 ^ self readInt: 8! !
1478
1479!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 02:35'!
1480readInt: size
1481 | buf val |
1482 buf := transport read: size.
1483 val := self intFromByteArray: buf.
1484 ^ buf first > 16r7F
1485 ifTrue: [self unsignedInt: val size: size]
1486 ifFalse: [val]! !
1487
1488!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:57'!
1489readListBegin
1490 ^ TList new
1491 elemType: self readByte;
1492 size: self readI32! !
1493
1494!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:58'!
1495readMapBegin
1496 ^ TMap new
1497 keyType: self readByte;
1498 valueType: self readByte;
1499 size: self readI32! !
1500
1501!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 04:22'!
1502readMessageBegin
1503 | version |
1504 version := self readI32.
1505
1506 (version bitAnd: self versionMask) = self version1
1507 ifFalse: [TProtocolError signalWithCode: TProtocolError badVersion].
1508
1509 ^ TMessage new
1510 type: (version bitAnd: 16r000000FF);
1511 name: self readString;
1512 seqid: self readI32! !
1513
1514!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/28/2007 16:24'!
1515readRawInt: size
1516 ^ self intFromByteArray: (transport read: size)! !
1517
1518!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 00:59'!
1519readSetBegin
1520 "element type, size"
1521 ^ TSet new
1522 elemType: self readByte;
1523 size: self readI32! !
1524
1525!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/26/2007 04:48'!
1526readString
1527 ^ (transport read: self readI32) asString! !
1528
1529!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 04:22'!
1530unsignedInt: val size: size
1531 ^ 0 - ((val - 1) bitXor: ((2 raisedTo: (size * 8)) - 1))! !
1532
1533!TBinaryProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:13'!
1534version1
1535 ^ 16r80010000 ! !
1536
1537!TBinaryProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 18:01'!
1538versionMask
1539 ^ 16rFFFF0000! !
1540
1541!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 18:35'!
1542write: aString
1543 transport write: aString! !
1544
1545!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:23'!
1546writeBool: bool
1547 bool ifTrue: [self writeByte: 1]
1548 ifFalse: [self writeByte: 0]! !
1549
1550!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/26/2007 09:31'!
1551writeByte: aNumber
1552 aNumber > 16rFF ifTrue: [TError signal: 'writeByte too big'].
1553 transport write: (Array with: aNumber)! !
1554
1555!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/28/2007 16:16'!
1556writeDouble: aDouble
1557 self writeI32: (aDouble basicAt: 1);
1558 writeI32: (aDouble basicAt: 2)! !
1559
1560!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:56'!
1561writeField: aField
1562 self writeByte: aField type;
1563 writeI16: aField id! !
1564
1565!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/25/2007 00:01'!
1566writeFieldBegin: aField
1567 self writeByte: aField type.
1568 self writeI16: aField id! !
1569
1570!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 18:04'!
1571writeFieldStop
1572 self writeByte: TType stop! !
1573
1574!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 02:06'!
1575writeI16: i16
1576 self writeInt: i16 size: 2! !
1577
1578!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 02:06'!
1579writeI32: i32
1580 self writeInt: i32 size: 4! !
1581
1582!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 02:06'!
1583writeI64: i64
1584 self writeInt: i64 size: 8! !
1585
1586!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 04:23'!
1587writeInt: val size: size
1588 1 to: size do: [:n | self writeByte: ((val bitShift: (size negated + n) * 8) bitAnd: 16rFF)]! !
1589
1590!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 00:48'!
1591writeListBegin: aList
1592 self writeByte: aList elemType; writeI32: aList size! !
1593
1594!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:55'!
1595writeMapBegin: aMap
1596 self writeByte: aMap keyType;
1597 writeByte: aMap valueType;
1598 writeI32: aMap size! !
1599
1600!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 20:36'!
1601writeMessageBegin: msg
1602 self writeI32: (self version1 bitOr: msg type);
1603 writeString: msg name;
1604 writeI32: msg seqid! !
1605
1606!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 11/1/2007 00:56'!
1607writeSetBegin: aSet
1608 self writeByte: aSet elemType; writeI32: aSet size! !
1609
1610!TBinaryProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 18:35'!
1611writeString: aString
1612 self writeI32: aString size;
1613 write: aString! !
1614
1615!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1616readBool! !
1617
1618!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1619readByte! !
1620
1621!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1622readDouble! !
1623
1624!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1625readFieldBegin! !
1626
1627!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1628readFieldEnd! !
1629
1630!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1631readI16! !
1632
1633!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1634readI32! !
1635
1636!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1637readI64! !
1638
1639!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1640readListBegin! !
1641
1642!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1643readListEnd! !
1644
1645!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1646readMapBegin! !
1647
1648!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1649readMapEnd! !
1650
1651!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:39'!
1652readMessageBegin! !
1653
1654!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:39'!
1655readMessageEnd! !
1656
1657!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1658readSetBegin! !
1659
1660!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1661readSetEnd! !
1662
1663!TProtocol methodsFor: 'reading' stamp: 'pc 10/25/2007 16:10'!
1664readSimpleType: aType
1665 aType = TType bool ifTrue: [^ self readBool].
1666 aType = TType byte ifTrue: [^ self readByte].
1667 aType = TType double ifTrue: [^ self readDouble].
1668 aType = TType i16 ifTrue: [^ self readI16].
1669 aType = TType i32 ifTrue: [^ self readI32].
1670 aType = TType i64 ifTrue: [^ self readI64].
1671 aType = TType list ifTrue: [^ self readBool].! !
1672
1673!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1674readString! !
1675
1676!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1677readStructBegin
1678 ! !
1679
1680!TProtocol methodsFor: 'reading' stamp: 'pc 10/24/2007 19:40'!
1681readStructEnd! !
1682
1683!TProtocol methodsFor: 'reading' stamp: 'pc 10/26/2007 21:34'!
1684skip: aType
1685 aType = TType stop ifTrue: [^ self].
1686 aType = TType bool ifTrue: [^ self readBool].
1687 aType = TType byte ifTrue: [^ self readByte].
1688 aType = TType i16 ifTrue: [^ self readI16].
1689 aType = TType i32 ifTrue: [^ self readI32].
1690 aType = TType i64 ifTrue: [^ self readI64].
1691 aType = TType string ifTrue: [^ self readString].
1692 aType = TType double ifTrue: [^ self readDouble].
1693 aType = TType struct ifTrue:
1694 [| field |
1695 self readStructBegin.
1696 [(field := self readFieldBegin) type = TType stop] whileFalse:
1697 [self skip: field type. self readFieldEnd].
1698 ^ self readStructEnd].
1699 aType = TType map ifTrue:
1700 [| map |
1701 map := self readMapBegin.
1702 map size timesRepeat: [self skip: map keyType. self skip: map valueType].
1703 ^ self readMapEnd].
1704 aType = TType list ifTrue:
1705 [| list |
1706 list := self readListBegin.
1707 list size timesRepeat: [self skip: list elemType].
1708 ^ self readListEnd].
1709 aType = TType set ifTrue:
1710 [| set |
1711 set := self readSetBegin.
1712 set size timesRepeat: [self skip: set elemType].
1713 ^ self readSetEnd].
1714
1715 self error: 'Unknown type'! !
1716
1717!TProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 23:02'!
1718transport
1719 ^ transport! !
1720
1721!TProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:28'!
1722transport: aTransport
1723 transport := aTransport! !
1724
1725!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1726writeBool: aBool! !
1727
1728!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1729writeByte: aByte! !
1730
1731!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:38'!
1732writeDouble: aFloat! !
1733
1734!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:38'!
1735writeFieldBegin: aField! !
1736
1737!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1738writeFieldEnd! !
1739
1740!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1741writeFieldStop! !
1742
1743!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1744writeI16: i16! !
1745
1746!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1747writeI32: i32! !
1748
1749!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1750writeI64: i64! !
1751
1752!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:39'!
1753writeListBegin: aList! !
1754
1755!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1756writeListEnd! !
1757
1758!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:39'!
1759writeMapBegin: aMap! !
1760
1761!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1762writeMapEnd! !
1763
1764!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:36'!
1765writeMessageBegin! !
1766
1767!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:36'!
1768writeMessageEnd! !
1769
1770!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:39'!
1771writeSetBegin: aSet! !
1772
1773!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1774writeSetEnd! !
1775
1776!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:38'!
1777writeString: aString! !
1778
1779!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:38'!
1780writeStructBegin: aStruct! !
1781
1782!TProtocol methodsFor: 'writing' stamp: 'pc 10/24/2007 19:37'!
1783writeStructEnd! !
1784
1785Object subclass: #TResult
1786 instanceVariableNames: 'success oprot iprot exception'
1787 classVariableNames: ''
1788 poolDictionaries: ''
1789 category: 'Thrift'!
1790
1791!TResult methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 21:35'!
1792exception
1793 ^ exception! !
1794
1795!TResult methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 21:35'!
1796exception: anError
1797 exception := anError! !
1798
1799!TResult methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 14:43'!
1800success
1801 ^ success! !
1802
1803!TResult methodsFor: 'as yet unclassified' stamp: 'pc 10/26/2007 14:43'!
1804success: anObject
1805 success := anObject! !
1806
1807Object subclass: #TSizedObject
1808 instanceVariableNames: 'size'
1809 classVariableNames: ''
1810 poolDictionaries: ''
1811 category: 'Thrift-Protocol'!
1812
1813TSizedObject subclass: #TList
1814 instanceVariableNames: 'elemType'
1815 classVariableNames: ''
1816 poolDictionaries: ''
1817 category: 'Thrift-Protocol'!
1818
1819!TList methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:04'!
1820elemType
1821 ^ elemType ifNil: [TType stop]! !
1822
1823!TList methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:42'!
1824elemType: anInteger
1825 elemType := anInteger! !
1826
1827TList subclass: #TSet
1828 instanceVariableNames: ''
1829 classVariableNames: ''
1830 poolDictionaries: ''
1831 category: 'Thrift-Protocol'!
1832
1833TSizedObject subclass: #TMap
1834 instanceVariableNames: 'keyType valueType'
1835 classVariableNames: ''
1836 poolDictionaries: ''
1837 category: 'Thrift-Protocol'!
1838
1839!TMap methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:04'!
1840keyType
1841 ^ keyType ifNil: [TType stop]! !
1842
1843!TMap methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:45'!
1844keyType: anInteger
1845 keyType := anInteger! !
1846
1847!TMap methodsFor: 'accessing' stamp: 'pc 10/24/2007 20:04'!
1848valueType
1849 ^ valueType ifNil: [TType stop]! !
1850
1851!TMap methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:45'!
1852valueType: anInteger
1853 valueType := anInteger! !
1854
1855!TSizedObject methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 20:03'!
1856size
1857 ^ size ifNil: [0]! !
1858
1859!TSizedObject methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 20:06'!
1860size: anInteger
1861 size := anInteger! !
1862
1863Object subclass: #TSocket
1864 instanceVariableNames: 'host port stream'
1865 classVariableNames: ''
1866 poolDictionaries: ''
1867 category: 'Thrift-Transport'!
1868
1869!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:34'!
1870close
1871 self isOpen ifTrue: [stream close]! !
1872
1873!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:23'!
1874connect
1875 ^ (self socketStream openConnectionToHost:
1876 (NetNameResolver addressForName: host) port: port)
1877 timeout: 180;
1878 binary;
1879 yourself! !
1880
1881!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 20:35'!
1882flush
1883 stream flush! !
1884
1885!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:08'!
1886host: aString
1887 host := aString! !
1888
1889!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 20:34'!
1890isOpen
1891 ^ stream isNil not
1892 and: [stream socket isConnected]
1893 and: [stream socket isOtherEndClosed not]! !
1894
1895!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:22'!
1896open
1897 stream := self connect! !
1898
1899!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:09'!
1900port: anInteger
1901 port := anInteger! !
1902
1903!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:17'!
1904read: size
1905 | data |
1906 [data := stream next: size.
1907 data isEmpty ifTrue: [TTransportError signal: 'Could not read ', size asString, ' bytes'].
1908 ^ data]
1909 on: ConnectionClosed
1910 do: [TTransportClosedError signal]! !
1911
1912!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:18'!
1913socketStream
1914 ^ Smalltalk at: #FastSocketStream ifAbsent: [SocketStream] ! !
1915
1916!TSocket methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 22:17'!
1917write: aCollection
1918 [stream nextPutAll: aCollection]
1919 on: ConnectionClosed
1920 do: [TTransportClosedError signal]! !
1921
1922Object subclass: #TStruct
1923 instanceVariableNames: 'name'
1924 classVariableNames: ''
1925 poolDictionaries: ''
1926 category: 'Thrift-Protocol'!
1927
1928!TStruct methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:47'!
1929name
1930 ^ name! !
1931
1932!TStruct methodsFor: 'accessing' stamp: 'pc 10/24/2007 19:47'!
1933name: aString
1934 name := aString! !
1935
1936Object subclass: #TTest
1937 instanceVariableNames: 'prot'
1938 classVariableNames: ''
1939 poolDictionaries: ''
1940 category: 'Thrift-Test'!
1941
1942!TTest methodsFor: 'as yet unclassified' stamp: 'pc 11/1/2007 04:47'!
1943protocol: aProtocol
1944 prot := aProtocol! !
1945
1946!TTest methodsFor: 'as yet unclassified' stamp: 'pc 11/1/2007 04:49'!
1947runAll
1948 | c |
1949 c := ThriftTestClient new inProtocol: prot.
1950 c testByteThing: 32.
1951 c testDoubleThing: -1.0.
1952 c testEnumThing: 1.
1953 c testExceptionArg: 'foo'.
1954 c testI16Thing: 16.
1955 c testI16Thing: -16.
1956 c testI32Thing: 32.
1957 c testI32Thing: -32.
1958 c testI64Thing: 123.
1959 c testDoubleThing: 1.2.
1960 c testStructThing: (Xtruct new byteThing: 1; i32Thing: 2; i64Thing: 3; stringThing: 'foo').
1961 c testSetThing: (Set new).
1962 c testListThing: (OrderedCollection new).
1963 c testEnumThing: 1.
1964 c testInsanityArgument:
1965 (Insanity new
1966 userMap: (Dictionary new at: 1 put: 2; yourself);
1967 xtructs: (OrderedCollection new)).
1968 c testMultiArg0: 1 arg1: 2 arg2: 3 arg3: (Dictionary new) arg4: ((ThriftTest enums at: 'Numberz') at: 'FIVE') arg5: 6.
1969 c testExceptionArg: 'Xception'.
1970 c testMultiExceptionArg0: 'Xception' arg1: 'Xception2'! !
1971
1972Object subclass: #TTransport
1973 instanceVariableNames: ''
1974 classVariableNames: ''
1975 poolDictionaries: ''
1976 category: 'Thrift-Transport'!
1977
1978!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:18'!
1979close
1980 self subclassResponsibility! !
1981
1982!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:22'!
1983flush
1984 self subclassResponsibility! !
1985
1986!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:18'!
1987isOpen
1988 self subclassResponsibility! !
1989
1990!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:18'!
1991open
1992 self subclassResponsibility! !
1993
1994!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:18'!
1995read: anInteger
1996 self subclassResponsibility! !
1997
1998!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:22'!
1999readAll: anInteger
2000 ^ String streamContents: [:str |
2001 [str size < anInteger] whileTrue:
2002 [str nextPutAll: (self read: anInteger - str size)]]! !
2003
2004!TTransport methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:22'!
2005write: aString
2006 self subclassResponsibility! !
2007
2008Object subclass: #TType
2009 instanceVariableNames: ''
2010 classVariableNames: ''
2011 poolDictionaries: ''
2012 category: 'Thrift'!
2013
2014!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
2015bool
2016 ^ 2! !
2017
2018!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
2019byte
2020 ^ 3! !
2021
2022!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/25/2007 15:55'!
2023codeOf: aTypeName
2024 self typeMap do: [:each | each first = aTypeName ifTrue: [^ each second]].
2025 ^ nil! !
2026
2027!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
2028double
2029 ^ 4! !
2030
2031!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
2032i16
2033 ^ 6! !
2034
2035!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
2036i32
2037 ^ 8! !
2038
2039!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
2040i64
2041 ^ 10! !
2042
2043!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
2044list
2045 ^ 15! !
2046
2047!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
2048map
2049 ^ 13! !
2050
2051!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/25/2007 15:56'!
2052nameOf: aTypeCode
2053 self typeMap do: [:each | each second = aTypeCode ifTrue: [^ each first]].
2054 ^ nil! !
2055
2056!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
2057set
2058 ^ 14! !
2059
2060!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
2061stop
2062 ^ 0! !
2063
2064!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
2065string
2066 ^ 11! !
2067
2068!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:04'!
2069struct
2070 ^ 12! !
2071
2072!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/25/2007 15:51'!
2073typeMap
2074 ^ #((bool 2) (byte 3) (double 4) (i16 6) (i32 8) (i64 10) (list 15)
2075 (map 13) (set 15) (stop 0) (string 11) (struct 12) (void 1))! !
2076
2077!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
2078void
2079 ^ 1! !
2080
2081Object subclass: #Xtruct
2082 instanceVariableNames: 'stringThing byteThing i32Thing i64Thing'
2083 classVariableNames: ''
2084 poolDictionaries: ''
2085 category: 'Thrift-Test'!
2086
2087!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2088byteThing
2089 ^ byteThing! !
2090
2091!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2092byteThing: aByte
2093 byteThing := aByte! !
2094
2095!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2096i32Thing
2097 ^ i32Thing! !
2098
2099!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2100i32Thing: anI32
2101 i32Thing := anI32! !
2102
2103!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2104i64Thing
2105 ^ i64Thing! !
2106
2107!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2108i64Thing: anI64
2109 i64Thing := anI64! !
2110
2111!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2112stringThing
2113 ^ stringThing! !
2114
2115!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2116stringThing: aString
2117 stringThing := aString! !
2118
2119Object subclass: #Xtruct2
2120 instanceVariableNames: 'byteThing structThing i32Thing'
2121 classVariableNames: ''
2122 poolDictionaries: ''
2123 category: 'Thrift-Test'!
2124
2125!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2126byteThing
2127 ^ byteThing! !
2128
2129!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2130byteThing: aByte
2131 byteThing := aByte! !
2132
2133!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2134i32Thing
2135 ^ i32Thing! !
2136
2137!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2138i32Thing: anI32
2139 i32Thing := anI32! !
2140
2141!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2142structThing
2143 ^ structThing! !
2144
2145!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
2146structThing: aXtruct
2147 structThing := aXtruct! !