Merging in some Smalltalk changes from Patrick Collison
Reviewed By: mcslee
Test Plan: Rebuild Thrift compiler
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665361 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/st/README b/lib/st/README
index 14c72db..7ceb7ff 100644
--- a/lib/st/README
+++ b/lib/st/README
@@ -1,11 +1,11 @@
Author: Patrick Collison <patrick@collison.ie>
Last updated Nov 2007
-To get started, just file in thrift.st with Squeak, and run something like:
+To get started, just file in thrift.st with Squeak, run thrift -st
+on the tutorial .thrift files (and file in the resulting code), and
+then:
-sock := TSocket new host: 'localhost'; port: 9090; open.
-prot := TBinaryProtocol new transport: sock.
-calc := CalculatorClient new inProtocol: prot.
+calc := CalculatorClient binaryOnHost: 'localhost' port: '9090'
calc addNum1: 10 num2: 15
-Tested in Squeak 3.7, but should work fine with anything later.
\ No newline at end of file
+Tested in Squeak 3.7, but should work fine with anything later.
diff --git a/lib/st/thrift.st b/lib/st/thrift.st
index c24f616..445534c 100644
--- a/lib/st/thrift.st
+++ b/lib/st/thrift.st
@@ -1,6 +1,5 @@
SystemOrganization addCategory: #Thrift!
SystemOrganization addCategory: #'Thrift-Protocol'!
-SystemOrganization addCategory: #'Thrift-Test'!
SystemOrganization addCategory: #'Thrift-Transport'!
Error subclass: #TError
@@ -59,149 +58,19 @@
poolDictionaries: ''
category: 'Thrift-Transport'!
-Error subclass: #Xception
- instanceVariableNames: 'errorCode message'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-errorCode
- ^ errorCode! !
-
-!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-errorCode: anI32
- errorCode := anI32! !
-
-!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-message
- ^ message! !
-
-!Xception methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-message: aString
- message := aString! !
-
-Error subclass: #Xception2
- instanceVariableNames: 'errorCode structThing'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-errorCode
- ^ errorCode! !
-
-!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-errorCode: anI32
- errorCode := anI32! !
-
-!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-structThing
- ^ structThing! !
-
-!Xception2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-structThing: aXtruct
- structThing := aXtruct! !
-
-Object subclass: #Bonk
- instanceVariableNames: 'message type'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-message
- ^ message! !
-
-!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-message: aString
- message := aString! !
-
-!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-type
- ^ type! !
-
-!Bonk methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-type: anI32
- type := anI32! !
-
-Object subclass: #EmptyStruct
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-Object subclass: #Insanity
- instanceVariableNames: 'userMap xtructs'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-userMap
- ^ userMap! !
-
-!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-userMap: a
- userMap := a! !
-
-!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-xtructs
- ^ xtructs! !
-
-!Insanity methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-xtructs: a
- xtructs := a! !
-
Object subclass: #TClient
instanceVariableNames: 'iprot oprot seqid remoteSeqid'
classVariableNames: ''
poolDictionaries: ''
category: 'Thrift'!
-TClient subclass: #SecondServiceClient
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-blahBlah
- ""
- self sendBlahBlah.
- ^ self recvBlahBlah success
-! !
-
-!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvBlahBlah
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp118 temp117|
- temp117 := TResult new.
- iprot readStructBegin.
- [temp118 := iprot readFieldBegin.
- temp118 type = TType stop] whileFalse: [|temp119|
- temp118 id = 0 ifTrue: [
- temp119 := true.
- temp117 success: iprot readVoid].
- temp119 ifNil: [iprot skip: temp118 type]].
- oprot readStructEnd.
- temp117] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!SecondServiceClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendBlahBlah
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'blahBlah';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'BlahBlah_args').
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
+!TClient class methodsFor: 'as yet unclassified' stamp: 'pc 11/7/2007 06:00'!
+binaryOnHost: aString port: anInteger
+ | sock |
+ sock := TSocket new host: aString; port: anInteger; open; yourself.
+ ^ self new
+ inProtocol: (TBinaryProtocol new transport: sock);
+ yourself! !
!TClient methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 23:03'!
inProtocol: aProtocol
@@ -222,1134 +91,12 @@
validateRemoteMessage: aMsg
remoteSeqid
ifNil: [remoteSeqid := aMsg seqid]
- ifNotNil:
+ ifNotNil:
[(remoteSeqid + 1) = aMsg seqid ifFalse:
[TProtocolError signal: 'Bad seqid: ', aMsg seqid asString,
'; wanted: ', remoteSeqid asString].
remoteSeqid := aMsg seqid]! !
-TClient subclass: #ThriftTestClient
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestByte
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp7 temp6|
- temp6 := TResult new.
- iprot readStructBegin.
- [temp7 := iprot readFieldBegin.
- temp7 type = TType stop] whileFalse: [|temp8|
- temp7 id = 0 ifTrue: [
- temp8 := true.
- temp6 success: iprot readByte].
- temp8 ifNil: [iprot skip: temp7 type]].
- oprot readStructEnd.
- temp6] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestDouble
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp19 temp18|
- temp18 := TResult new.
- iprot readStructBegin.
- [temp19 := iprot readFieldBegin.
- temp19 type = TType stop] whileFalse: [|temp20|
- temp19 id = 0 ifTrue: [
- temp20 := true.
- temp18 success: iprot readDouble].
- temp20 ifNil: [iprot skip: temp19 type]].
- oprot readStructEnd.
- temp18] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestEnum
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp56 temp55|
- temp55 := TResult new.
- iprot readStructBegin.
- [temp56 := iprot readFieldBegin.
- temp56 type = TType stop] whileFalse: [|temp57|
- temp56 id = 0 ifTrue: [
- temp57 := true.
- temp55 success: iprot readI32].
- temp57 ifNil: [iprot skip: temp56 type]].
- oprot readStructEnd.
- temp55] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestException
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp97 temp96|
- temp96 := TResult new.
- iprot readStructBegin.
- [temp97 := iprot readFieldBegin.
- temp97 type = TType stop] whileFalse: [|temp98|
- temp97 id = 0 ifTrue: [
- temp98 := true.
- temp96 success: iprot readVoid].
- temp97 id = -2 ifTrue: [
- temp98 := true.
- temp96 exception: [|temp100 temp99|
- temp99 := Xception new.
- iprot readStructBegin.
- [temp100 := iprot readFieldBegin.
- temp100 type = TType stop] whileFalse: [|temp101|
- temp100 id = 1 ifTrue: [
- temp101 := true.
- temp99 errorCode: iprot readI32].
- temp100 id = 2 ifTrue: [
- temp101 := true.
- temp99 message: iprot readString].
- temp101 ifNil: [iprot skip: temp100 type]].
- oprot readStructEnd.
- temp99] value].
- temp98 ifNil: [iprot skip: temp97 type]].
- oprot readStructEnd.
- temp96] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestI16
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp10 temp9|
- temp9 := TResult new.
- iprot readStructBegin.
- [temp10 := iprot readFieldBegin.
- temp10 type = TType stop] whileFalse: [|temp11|
- temp10 id = 0 ifTrue: [
- temp11 := true.
- temp9 success: iprot readI16].
- temp11 ifNil: [iprot skip: temp10 type]].
- oprot readStructEnd.
- temp9] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestI32
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp13 temp12|
- temp12 := TResult new.
- iprot readStructBegin.
- [temp13 := iprot readFieldBegin.
- temp13 type = TType stop] whileFalse: [|temp14|
- temp13 id = 0 ifTrue: [
- temp14 := true.
- temp12 success: iprot readI32].
- temp14 ifNil: [iprot skip: temp13 type]].
- oprot readStructEnd.
- temp12] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestI64
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp16 temp15|
- temp15 := TResult new.
- iprot readStructBegin.
- [temp16 := iprot readFieldBegin.
- temp16 type = TType stop] whileFalse: [|temp17|
- temp16 id = 0 ifTrue: [
- temp17 := true.
- temp15 success: iprot readI64].
- temp17 ifNil: [iprot skip: temp16 type]].
- oprot readStructEnd.
- temp15] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestInsanity
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp72 temp71|
- temp71 := TResult new.
- iprot readStructBegin.
- [temp72 := iprot readFieldBegin.
- temp72 type = TType stop] whileFalse: [|temp73|
- temp72 id = 0 ifTrue: [
- temp73 := true.
- temp71 success: [|temp74 temp75|
- temp74 := iprot readMapBegin.
- temp75 := Dictionary new.
- temp74 size timesRepeat: [
- temp75 at: iprot readI64 put: [|temp76 temp77|
- temp76 := iprot readMapBegin.
- temp77 := Dictionary new.
- temp76 size timesRepeat: [
- temp77 at: iprot readI32 put: [|temp79 temp78|
- temp78 := Insanity new.
- iprot readStructBegin.
- [temp79 := iprot readFieldBegin.
- temp79 type = TType stop] whileFalse: [|temp80|
- temp79 id = 1 ifTrue: [
- temp80 := true.
- temp78 userMap: [|temp81 temp82|
- temp81 := iprot readMapBegin.
- temp82 := Dictionary new.
- temp81 size timesRepeat: [
- temp82 at: iprot readI32 put: iprot readI64].
- iprot readMapEnd.
- temp82] value].
- temp79 id = 2 ifTrue: [
- temp80 := true.
- temp78 xtructs: [|temp83 temp84| temp83 := iprot readListBegin.
- temp84 := OrderedCollection new.
- temp83 size timesRepeat: [
- temp84 add: [|temp86 temp85|
- temp85 := Xtruct new.
- iprot readStructBegin.
- [temp86 := iprot readFieldBegin.
- temp86 type = TType stop] whileFalse: [|temp87|
- temp86 id = 1 ifTrue: [
- temp87 := true.
- temp85 stringThing: iprot readString].
- temp86 id = 4 ifTrue: [
- temp87 := true.
- temp85 byteThing: iprot readByte].
- temp86 id = 9 ifTrue: [
- temp87 := true.
- temp85 i32Thing: iprot readI32].
- temp86 id = 11 ifTrue: [
- temp87 := true.
- temp85 i64Thing: iprot readI64].
- temp87 ifNil: [iprot skip: temp86 type]].
- oprot readStructEnd.
- temp85] value].
- iprot readListEnd.
- temp84] value].
- temp80 ifNil: [iprot skip: temp79 type]].
- oprot readStructEnd.
- temp78] value].
- iprot readMapEnd.
- temp77] value].
- iprot readMapEnd.
- temp75] value].
- temp73 ifNil: [iprot skip: temp72 type]].
- oprot readStructEnd.
- temp71] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestList
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp51 temp50|
- temp50 := TResult new.
- iprot readStructBegin.
- [temp51 := iprot readFieldBegin.
- temp51 type = TType stop] whileFalse: [|temp52|
- temp51 id = 0 ifTrue: [
- temp52 := true.
- temp50 success: [|temp53 temp54| temp53 := iprot readListBegin.
- temp54 := OrderedCollection new.
- temp53 size timesRepeat: [
- temp54 add: iprot readI32].
- iprot readListEnd.
- temp54] value].
- temp52 ifNil: [iprot skip: temp51 type]].
- oprot readStructEnd.
- temp50] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestMap
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp39 temp38|
- temp38 := TResult new.
- iprot readStructBegin.
- [temp39 := iprot readFieldBegin.
- temp39 type = TType stop] whileFalse: [|temp40|
- temp39 id = 0 ifTrue: [
- temp40 := true.
- temp38 success: [|temp41 temp42|
- temp41 := iprot readMapBegin.
- temp42 := Dictionary new.
- temp41 size timesRepeat: [
- temp42 at: iprot readI32 put: iprot readI32].
- iprot readMapEnd.
- temp42] value].
- temp40 ifNil: [iprot skip: temp39 type]].
- oprot readStructEnd.
- temp38] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestMapMap
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp62 temp61|
- temp61 := TResult new.
- iprot readStructBegin.
- [temp62 := iprot readFieldBegin.
- temp62 type = TType stop] whileFalse: [|temp63|
- temp62 id = 0 ifTrue: [
- temp63 := true.
- temp61 success: [|temp64 temp65|
- temp64 := iprot readMapBegin.
- temp65 := Dictionary new.
- temp64 size timesRepeat: [
- temp65 at: iprot readI32 put: [|temp66 temp67|
- temp66 := iprot readMapBegin.
- temp67 := Dictionary new.
- temp66 size timesRepeat: [
- temp67 at: iprot readI32 put: iprot readI32].
- iprot readMapEnd.
- temp67] value].
- iprot readMapEnd.
- temp65] value].
- temp63 ifNil: [iprot skip: temp62 type]].
- oprot readStructEnd.
- temp61] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestMulti
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp91 temp90|
- temp90 := TResult new.
- iprot readStructBegin.
- [temp91 := iprot readFieldBegin.
- temp91 type = TType stop] whileFalse: [|temp92|
- temp91 id = 0 ifTrue: [
- temp92 := true.
- temp90 success: [|temp94 temp93|
- temp93 := Xtruct new.
- iprot readStructBegin.
- [temp94 := iprot readFieldBegin.
- temp94 type = TType stop] whileFalse: [|temp95|
- temp94 id = 1 ifTrue: [
- temp95 := true.
- temp93 stringThing: iprot readString].
- temp94 id = 4 ifTrue: [
- temp95 := true.
- temp93 byteThing: iprot readByte].
- temp94 id = 9 ifTrue: [
- temp95 := true.
- temp93 i32Thing: iprot readI32].
- temp94 id = 11 ifTrue: [
- temp95 := true.
- temp93 i64Thing: iprot readI64].
- temp95 ifNil: [iprot skip: temp94 type]].
- oprot readStructEnd.
- temp93] value].
- temp92 ifNil: [iprot skip: temp91 type]].
- oprot readStructEnd.
- temp90] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestMultiException
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp103 temp102|
- temp102 := TResult new.
- iprot readStructBegin.
- [temp103 := iprot readFieldBegin.
- temp103 type = TType stop] whileFalse: [|temp104|
- temp103 id = 0 ifTrue: [
- temp104 := true.
- temp102 success: [|temp106 temp105|
- temp105 := Xtruct new.
- iprot readStructBegin.
- [temp106 := iprot readFieldBegin.
- temp106 type = TType stop] whileFalse: [|temp107|
- temp106 id = 1 ifTrue: [
- temp107 := true.
- temp105 stringThing: iprot readString].
- temp106 id = 4 ifTrue: [
- temp107 := true.
- temp105 byteThing: iprot readByte].
- temp106 id = 9 ifTrue: [
- temp107 := true.
- temp105 i32Thing: iprot readI32].
- temp106 id = 11 ifTrue: [
- temp107 := true.
- temp105 i64Thing: iprot readI64].
- temp107 ifNil: [iprot skip: temp106 type]].
- oprot readStructEnd.
- temp105] value].
- temp103 id = -3 ifTrue: [
- temp104 := true.
- temp102 exception: [|temp109 temp108|
- temp108 := Xception new.
- iprot readStructBegin.
- [temp109 := iprot readFieldBegin.
- temp109 type = TType stop] whileFalse: [|temp110|
- temp109 id = 1 ifTrue: [
- temp110 := true.
- temp108 errorCode: iprot readI32].
- temp109 id = 2 ifTrue: [
- temp110 := true.
- temp108 message: iprot readString].
- temp110 ifNil: [iprot skip: temp109 type]].
- oprot readStructEnd.
- temp108] value].
- temp103 id = -4 ifTrue: [
- temp104 := true.
- temp102 exception: [|temp112 temp111|
- temp111 := Xception2 new.
- iprot readStructBegin.
- [temp112 := iprot readFieldBegin.
- temp112 type = TType stop] whileFalse: [|temp113|
- temp112 id = 1 ifTrue: [
- temp113 := true.
- temp111 errorCode: iprot readI32].
- temp112 id = 2 ifTrue: [
- temp113 := true.
- temp111 structThing: [|temp115 temp114|
- temp114 := Xtruct new.
- iprot readStructBegin.
- [temp115 := iprot readFieldBegin.
- temp115 type = TType stop] whileFalse: [|temp116|
- temp115 id = 1 ifTrue: [
- temp116 := true.
- temp114 stringThing: iprot readString].
- temp115 id = 4 ifTrue: [
- temp116 := true.
- temp114 byteThing: iprot readByte].
- temp115 id = 9 ifTrue: [
- temp116 := true.
- temp114 i32Thing: iprot readI32].
- temp115 id = 11 ifTrue: [
- temp116 := true.
- temp114 i64Thing: iprot readI64].
- temp116 ifNil: [iprot skip: temp115 type]].
- oprot readStructEnd.
- temp114] value].
- temp113 ifNil: [iprot skip: temp112 type]].
- oprot readStructEnd.
- temp111] value].
- temp104 ifNil: [iprot skip: temp103 type]].
- oprot readStructEnd.
- temp102] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestNest
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp28 temp27|
- temp27 := TResult new.
- iprot readStructBegin.
- [temp28 := iprot readFieldBegin.
- temp28 type = TType stop] whileFalse: [|temp29|
- temp28 id = 0 ifTrue: [
- temp29 := true.
- temp27 success: [|temp31 temp30|
- temp30 := Xtruct2 new.
- iprot readStructBegin.
- [temp31 := iprot readFieldBegin.
- temp31 type = TType stop] whileFalse: [|temp32|
- temp31 id = 1 ifTrue: [
- temp32 := true.
- temp30 byteThing: iprot readByte].
- temp31 id = 2 ifTrue: [
- temp32 := true.
- temp30 structThing: [|temp34 temp33|
- temp33 := Xtruct new.
- iprot readStructBegin.
- [temp34 := iprot readFieldBegin.
- temp34 type = TType stop] whileFalse: [|temp35|
- temp34 id = 1 ifTrue: [
- temp35 := true.
- temp33 stringThing: iprot readString].
- temp34 id = 4 ifTrue: [
- temp35 := true.
- temp33 byteThing: iprot readByte].
- temp34 id = 9 ifTrue: [
- temp35 := true.
- temp33 i32Thing: iprot readI32].
- temp34 id = 11 ifTrue: [
- temp35 := true.
- temp33 i64Thing: iprot readI64].
- temp35 ifNil: [iprot skip: temp34 type]].
- oprot readStructEnd.
- temp33] value].
- temp31 id = 3 ifTrue: [
- temp32 := true.
- temp30 i32Thing: iprot readI32].
- temp32 ifNil: [iprot skip: temp31 type]].
- oprot readStructEnd.
- temp30] value].
- temp29 ifNil: [iprot skip: temp28 type]].
- oprot readStructEnd.
- temp27] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestSet
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp45 temp44|
- temp44 := TResult new.
- iprot readStructBegin.
- [temp45 := iprot readFieldBegin.
- temp45 type = TType stop] whileFalse: [|temp46|
- temp45 id = 0 ifTrue: [
- temp46 := true.
- temp44 success: [|temp47 temp48| temp47 := iprot readSetBegin.
- temp48 := Set new.
- temp47 size timesRepeat: [
- temp48 add: iprot readI32].
- iprot readSetEnd.
- temp48] value].
- temp46 ifNil: [iprot skip: temp45 type]].
- oprot readStructEnd.
- temp44] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestString
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp4 temp3|
- temp3 := TResult new.
- iprot readStructBegin.
- [temp4 := iprot readFieldBegin.
- temp4 type = TType stop] whileFalse: [|temp5|
- temp4 id = 0 ifTrue: [
- temp5 := true.
- temp3 success: iprot readString].
- temp5 ifNil: [iprot skip: temp4 type]].
- oprot readStructEnd.
- temp3] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestStruct
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp22 temp21|
- temp21 := TResult new.
- iprot readStructBegin.
- [temp22 := iprot readFieldBegin.
- temp22 type = TType stop] whileFalse: [|temp23|
- temp22 id = 0 ifTrue: [
- temp23 := true.
- temp21 success: [|temp25 temp24|
- temp24 := Xtruct new.
- iprot readStructBegin.
- [temp25 := iprot readFieldBegin.
- temp25 type = TType stop] whileFalse: [|temp26|
- temp25 id = 1 ifTrue: [
- temp26 := true.
- temp24 stringThing: iprot readString].
- temp25 id = 4 ifTrue: [
- temp26 := true.
- temp24 byteThing: iprot readByte].
- temp25 id = 9 ifTrue: [
- temp26 := true.
- temp24 i32Thing: iprot readI32].
- temp25 id = 11 ifTrue: [
- temp26 := true.
- temp24 i64Thing: iprot readI64].
- temp26 ifNil: [iprot skip: temp25 type]].
- oprot readStructEnd.
- temp24] value].
- temp23 ifNil: [iprot skip: temp22 type]].
- oprot readStructEnd.
- temp21] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestTypedef
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp59 temp58|
- temp58 := TResult new.
- iprot readStructBegin.
- [temp59 := iprot readFieldBegin.
- temp59 type = TType stop] whileFalse: [|temp60|
- temp59 id = 0 ifTrue: [
- temp60 := true.
- temp58 success: iprot readI64].
- temp60 ifNil: [iprot skip: temp59 type]].
- oprot readStructEnd.
- temp58] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-recvTestVoid
- | f msg res |
- msg := oprot readMessageBegin.
- self validateRemoteMessage: msg.
- res := [|temp1 temp0|
- temp0 := TResult new.
- iprot readStructBegin.
- [temp1 := iprot readFieldBegin.
- temp1 type = TType stop] whileFalse: [|temp2|
- temp1 id = 0 ifTrue: [
- temp2 := true.
- temp0 success: iprot readVoid].
- temp2 ifNil: [iprot skip: temp1 type]].
- oprot readStructEnd.
- temp0] value.
- oprot readMessageEnd.
- oprot transport flush.
- res exception ifNotNil: [res exception signal].
- ^ res! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestByteThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testByte';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestByte_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType byte; id: 1).
- iprot writeByte: thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestDoubleThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testDouble';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestDouble_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType double; id: 1).
- iprot writeDouble: thing asFloat.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestEnumThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testEnum';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestEnum_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType i32; id: 1).
- iprot writeI32: thing.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestExceptionArg: arg
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testException';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestException_args').
- oprot writeFieldBegin: (TField new name: 'arg'; type: TType string; id: -1).
- iprot writeString: arg.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestI16Thing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testI16';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestI16_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType i16; id: 1).
- iprot writeI16: thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestI32Thing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testI32';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestI32_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType i32; id: 1).
- iprot writeI32: thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestI64Thing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testI64';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestI64_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType i64; id: 1).
- iprot writeI64: thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestInsanityArgument: argument
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testInsanity';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestInsanity_args').
- oprot writeFieldBegin: (TField new name: 'argument'; type: TType struct; id: 1).
- [oprot writeStructBegin: (TStruct new name: 'Insanity').
- oprot writeFieldBegin: (TField new name: 'userMap'; type: TType map; id: 1).
- [oprot writeMapBegin: (TMap new keyType: TType i32; valueType: TType i64; size: argument userMap size).
- argument userMap keysAndValuesDo: [:temp68 :temp69 |
- iprot writeI32: temp68.
- iprot writeI64: temp69 asInteger].
- oprot writeMapEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'xtructs'; type: TType list; id: 2).
- [oprot writeListBegin: (TList new elemType: TType struct; size: argument xtructs size).
- argument xtructs do: [:temp70|
- [oprot writeStructBegin: (TStruct new name: 'Xtruct').
- oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
- iprot writeString: temp70 stringThing.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
- iprot writeByte: temp70 byteThing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
- iprot writeI32: temp70 i32Thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
- iprot writeI64: temp70 i64Thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd] value
-].
- oprot writeListEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestListThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testList';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestList_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType list; id: 1).
- [oprot writeListBegin: (TList new elemType: TType i32; size: thing size).
- thing do: [:temp49|
- iprot writeI32: temp49 asInteger
-].
- oprot writeListEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestMapMapHello: hello
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testMapMap';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestMapMap_args').
- oprot writeFieldBegin: (TField new name: 'hello'; type: TType i32; id: 1).
- iprot writeI32: hello asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestMapThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testMap';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestMap_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType map; id: 1).
- [oprot writeMapBegin: (TMap new keyType: TType i32; valueType: TType i32; size: thing size).
- thing keysAndValuesDo: [:temp36 :temp37 |
- iprot writeI32: temp36 asInteger.
- iprot writeI32: temp37 asInteger].
- oprot writeMapEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testMulti';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestMulti_args').
- oprot writeFieldBegin: (TField new name: 'arg0'; type: TType byte; id: -1).
- iprot writeByte: arg0 asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'arg1'; type: TType i32; id: -2).
- iprot writeI32: arg1 asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'arg2'; type: TType i64; id: -3).
- iprot writeI64: arg2 asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'arg3'; type: TType map; id: -4).
- [oprot writeMapBegin: (TMap new keyType: TType i16; valueType: TType string; size: arg3 size).
- arg3 keysAndValuesDo: [:temp88 :temp89 |
- iprot writeI16: temp88 asInteger.
- iprot writeString: temp89].
- oprot writeMapEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'arg4'; type: TType i32; id: -5).
- iprot writeI32: arg4.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'arg5'; type: TType i64; id: -6).
- iprot writeI64: arg5 asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestMultiExceptionArg0: arg0 arg1: arg1
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testMultiException';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestMultiException_args').
- oprot writeFieldBegin: (TField new name: 'arg0'; type: TType string; id: -1).
- iprot writeString: arg0.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'arg1'; type: TType string; id: -2).
- iprot writeString: arg1.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestNestThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testNest';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestNest_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType struct; id: 1).
- [oprot writeStructBegin: (TStruct new name: 'Xtruct2').
- oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 1).
- iprot writeByte: thing byteThing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'struct_thing'; type: TType struct; id: 2).
- [oprot writeStructBegin: (TStruct new name: 'Xtruct').
- oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
- iprot writeString: thing structThing stringThing.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
- iprot writeByte: thing structThing byteThing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
- iprot writeI32: thing structThing i32Thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
- iprot writeI64: thing structThing i64Thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 3).
- iprot writeI32: thing i32Thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestSetThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testSet';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestSet_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType set; id: 1).
- [oprot writeSetBegin: (TSet new elemType: TType i32; size: thing size).
- thing do: [:temp43|
- iprot writeI32: temp43 asInteger
-].
- oprot writeSetEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestStringThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testString';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestString_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType string; id: 1).
- iprot writeString: thing.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestStructThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testStruct';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestStruct_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType struct; id: 1).
- [oprot writeStructBegin: (TStruct new name: 'Xtruct').
- oprot writeFieldBegin: (TField new name: 'string_thing'; type: TType string; id: 1).
- iprot writeString: thing stringThing.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'byte_thing'; type: TType byte; id: 4).
- iprot writeByte: thing byteThing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'i32_thing'; type: TType i32; id: 9).
- iprot writeI32: thing i32Thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldBegin: (TField new name: 'i64_thing'; type: TType i64; id: 11).
- iprot writeI64: thing i64Thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd] value.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestTypedefThing: thing
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testTypedef';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestTypedef_args').
- oprot writeFieldBegin: (TField new name: 'thing'; type: TType i64; id: 1).
- iprot writeI64: thing asInteger.
- oprot writeFieldEnd.
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-sendTestVoid
- oprot writeMessageBegin:
- (TCallMessage new
- name: 'testVoid';
- seqid: self nextSeqid).
- oprot writeStructBegin: (TStruct new name: 'TestVoid_args').
- oprot writeFieldStop; writeStructEnd; writeMessageEnd.
- oprot transport flush! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testByteThing: thing
- "thing: byte"
- self sendTestByteThing: thing.
- ^ self recvTestByte success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testDoubleThing: thing
- "thing: double"
- self sendTestDoubleThing: thing.
- ^ self recvTestDouble success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testEnumThing: thing
- "thing: Numberz"
- self sendTestEnumThing: thing.
- ^ self recvTestEnum success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testExceptionArg: arg
- "arg: string"
- self sendTestExceptionArg: arg.
- ^ self recvTestException success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testI16Thing: thing
- "thing: i16"
- self sendTestI16Thing: thing.
- ^ self recvTestI16 success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testI32Thing: thing
- "thing: i32"
- self sendTestI32Thing: thing.
- ^ self recvTestI32 success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testI64Thing: thing
- "thing: i64"
- self sendTestI64Thing: thing.
- ^ self recvTestI64 success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testInsanityArgument: argument
- "argument: Insanity"
- self sendTestInsanityArgument: argument.
- ^ self recvTestInsanity success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testListThing: thing
- "thing: "
- self sendTestListThing: thing.
- ^ self recvTestList success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testMapMapHello: hello
- "hello: i32"
- self sendTestMapMapHello: hello.
- ^ self recvTestMapMap success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testMapThing: thing
- "thing: "
- self sendTestMapThing: thing.
- ^ self recvTestMap success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5
- "arg0: byte, arg1: i32, arg2: i64, arg3: , arg4: Numberz, arg5: UserId"
- self sendTestMultiArg0: arg0 arg1: arg1 arg2: arg2 arg3: arg3 arg4: arg4 arg5: arg5.
- ^ self recvTestMulti success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testMultiExceptionArg0: arg0 arg1: arg1
- "arg0: string, arg1: string"
- self sendTestMultiExceptionArg0: arg0 arg1: arg1.
- ^ self recvTestMultiException success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testNestThing: thing
- "thing: Xtruct2"
- self sendTestNestThing: thing.
- ^ self recvTestNest success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testSetThing: thing
- "thing: "
- self sendTestSetThing: thing.
- ^ self recvTestSet success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testStringThing: thing
- "thing: string"
- self sendTestStringThing: thing.
- ^ self recvTestString success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testStructThing: thing
- "thing: Xtruct"
- self sendTestStructThing: thing.
- ^ self recvTestStruct success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testTypedefThing: thing
- "thing: UserId"
- self sendTestTypedefThing: thing.
- ^ self recvTestTypedef success
-! !
-
-!ThriftTestClient methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-testVoid
- ""
- self sendTestVoid.
- ^ self recvTestVoid success
-! !
-
Object subclass: #TField
instanceVariableNames: 'name type id'
classVariableNames: ''
@@ -1459,7 +206,7 @@
readFieldBegin
| field |
field := TField new type: self readByte.
-
+
^ field type = TType stop
ifTrue: [field]
ifFalse: [field id: self readI16; yourself]! !
@@ -1502,10 +249,10 @@
readMessageBegin
| version |
version := self readI32.
-
+
(version bitAnd: self versionMask) = self version1
ifFalse: [TProtocolError signalWithCode: TProtocolError badVersion].
-
+
^ TMessage new
type: (version bitAnd: 16r000000FF);
name: self readString;
@@ -1711,7 +458,7 @@
set := self readSetBegin.
set size timesRepeat: [self skip: set elemType].
^ self readSetEnd].
-
+
self error: 'Unknown type'! !
!TProtocol methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 23:02'!
@@ -1933,42 +680,6 @@
name: aString
name := aString! !
-Object subclass: #TTest
- instanceVariableNames: 'prot'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!TTest methodsFor: 'as yet unclassified' stamp: 'pc 11/1/2007 04:47'!
-protocol: aProtocol
- prot := aProtocol! !
-
-!TTest methodsFor: 'as yet unclassified' stamp: 'pc 11/1/2007 04:49'!
-runAll
- | c |
- c := ThriftTestClient new inProtocol: prot.
- c testByteThing: 32.
- c testDoubleThing: -1.0.
- c testEnumThing: 1.
- c testExceptionArg: 'foo'.
- c testI16Thing: 16.
- c testI16Thing: -16.
- c testI32Thing: 32.
- c testI32Thing: -32.
- c testI64Thing: 123.
- c testDoubleThing: 1.2.
- c testStructThing: (Xtruct new byteThing: 1; i32Thing: 2; i64Thing: 3; stringThing: 'foo').
- c testSetThing: (Set new).
- c testListThing: (OrderedCollection new).
- c testEnumThing: 1.
- c testInsanityArgument:
- (Insanity new
- userMap: (Dictionary new at: 1 put: 2; yourself);
- xtructs: (OrderedCollection new)).
- c testMultiArg0: 1 arg1: 2 arg2: 3 arg3: (Dictionary new) arg4: ((ThriftTest enums at: 'Numberz') at: 'FIVE') arg5: 6.
- c testExceptionArg: 'Xception'.
- c testMultiExceptionArg0: 'Xception' arg1: 'Xception2'! !
-
Object subclass: #TTransport
instanceVariableNames: ''
classVariableNames: ''
@@ -2077,71 +788,3 @@
!TType class methodsFor: 'as yet unclassified' stamp: 'pc 10/24/2007 17:03'!
void
^ 1! !
-
-Object subclass: #Xtruct
- instanceVariableNames: 'stringThing byteThing i32Thing i64Thing'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-byteThing
- ^ byteThing! !
-
-!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-byteThing: aByte
- byteThing := aByte! !
-
-!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-i32Thing
- ^ i32Thing! !
-
-!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-i32Thing: anI32
- i32Thing := anI32! !
-
-!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-i64Thing
- ^ i64Thing! !
-
-!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-i64Thing: anI64
- i64Thing := anI64! !
-
-!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-stringThing
- ^ stringThing! !
-
-!Xtruct methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-stringThing: aString
- stringThing := aString! !
-
-Object subclass: #Xtruct2
- instanceVariableNames: 'byteThing structThing i32Thing'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Thrift-Test'!
-
-!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-byteThing
- ^ byteThing! !
-
-!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-byteThing: aByte
- byteThing := aByte! !
-
-!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-i32Thing
- ^ i32Thing! !
-
-!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-i32Thing: anI32
- i32Thing := anI32! !
-
-!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-structThing
- ^ structThing! !
-
-!Xtruct2 methodsFor: 'as yet uncategorized' stamp: 'thrift 11/01/2007 04:43'!
-structThing: aXtruct
- structThing := aXtruct! !