upfluence-thrift 2.6.1 → 2.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/benchmark/gen-rb/benchmark_constants.rb +11 -0
- data/benchmark/gen-rb/benchmark_service.rb +152 -0
- data/benchmark/gen-rb/benchmark_types.rb +10 -0
- data/lib/thrift/definition.rb +4 -0
- data/spec/gen-rb/base/base_service.rb +152 -0
- data/spec/gen-rb/base/base_service_constants.rb +11 -0
- data/spec/gen-rb/base/base_service_types.rb +45 -0
- data/spec/gen-rb/extended/extended_service.rb +137 -0
- data/spec/gen-rb/extended/extended_service_constants.rb +11 -0
- data/spec/gen-rb/extended/extended_service_types.rb +12 -0
- data/spec/gen-rb/flat/namespaced_nonblocking_service.rb +507 -0
- data/spec/gen-rb/flat/referenced_constants.rb +11 -0
- data/spec/gen-rb/flat/referenced_types.rb +17 -0
- data/spec/gen-rb/flat/thrift_namespaced_spec_constants.rb +11 -0
- data/spec/gen-rb/flat/thrift_namespaced_spec_types.rb +47 -0
- data/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb +507 -0
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb +11 -0
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb +47 -0
- data/spec/gen-rb/nonblocking_service.rb +507 -0
- data/spec/gen-rb/other_namespace/referenced_constants.rb +11 -0
- data/spec/gen-rb/other_namespace/referenced_types.rb +17 -0
- data/spec/gen-rb/thrift_spec_constants.rb +11 -0
- data/spec/gen-rb/thrift_spec_types.rb +1173 -0
- data/spec/spec_helper.rb +17 -17
- data/test/debug_proto/gen-rb/debug_proto_test_constants.rb +274 -0
- data/test/debug_proto/gen-rb/debug_proto_test_types.rb +1968 -0
- data/test/debug_proto/gen-rb/empty_service.rb +48 -0
- data/test/debug_proto/gen-rb/inherited.rb +151 -0
- data/test/debug_proto/gen-rb/reverse_order_service.rb +165 -0
- data/test/debug_proto/gen-rb/service_for_exception_with_a_map.rb +146 -0
- data/test/debug_proto/gen-rb/srv.rb +599 -0
- metadata +60 -2
@@ -0,0 +1,48 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler ()
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'debug_proto_test_types'
|
9
|
+
|
10
|
+
module EmptyService
|
11
|
+
SERVICE = 'EmptyService'.freeze
|
12
|
+
NAMESPACE = ''.freeze
|
13
|
+
|
14
|
+
LEGACY_ANNOTATIONS = {
|
15
|
+
}.freeze
|
16
|
+
|
17
|
+
STRUCTURED_ANNOTATIONS = [
|
18
|
+
].freeze
|
19
|
+
|
20
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
21
|
+
|
22
|
+
class Client
|
23
|
+
def initialize(client)
|
24
|
+
@client = ::Thrift.build_client(client)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.from_provider(provider)
|
28
|
+
Client.new(provider.build(NAMESPACE, SERVICE))
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
class Processor
|
34
|
+
include ::Thrift::Processor
|
35
|
+
|
36
|
+
def self.from_provider(handler, provider)
|
37
|
+
provider.build(NAMESPACE, SERVICE, Processor, handler)
|
38
|
+
end
|
39
|
+
|
40
|
+
METHODS = {
|
41
|
+
}.freeze
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
::Thrift.register_service_type(self)
|
46
|
+
|
47
|
+
end
|
48
|
+
|
@@ -0,0 +1,151 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler ()
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'srv'
|
9
|
+
require 'debug_proto_test_types'
|
10
|
+
|
11
|
+
module Inherited
|
12
|
+
SERVICE = 'Inherited'.freeze
|
13
|
+
NAMESPACE = ''.freeze
|
14
|
+
|
15
|
+
LEGACY_ANNOTATIONS = {
|
16
|
+
}.freeze
|
17
|
+
|
18
|
+
STRUCTURED_ANNOTATIONS = [
|
19
|
+
].freeze
|
20
|
+
|
21
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
22
|
+
|
23
|
+
class Identity_args
|
24
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
25
|
+
|
26
|
+
NAME = 'identity_args'.freeze
|
27
|
+
NAMESPACE = ''.freeze
|
28
|
+
|
29
|
+
LEGACY_ANNOTATIONS = {
|
30
|
+
}.freeze
|
31
|
+
|
32
|
+
STRUCTURED_ANNOTATIONS = [
|
33
|
+
].freeze
|
34
|
+
|
35
|
+
THRIFT_FIELD_INDEX_ARG = 1
|
36
|
+
|
37
|
+
THRIFT_FIELD_ARG_LEGACY_ANNOTATIONS = {
|
38
|
+
}.freeze
|
39
|
+
|
40
|
+
THRIFT_FIELD_ARG_STRUCTURED_ANNOTATIONS = [
|
41
|
+
].freeze
|
42
|
+
|
43
|
+
FIELDS = {
|
44
|
+
THRIFT_FIELD_INDEX_ARG => {type: ::Thrift::Types::I32, name: 'arg', legacy_annotations: THRIFT_FIELD_ARG_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_ARG_STRUCTURED_ANNOTATIONS}
|
45
|
+
}
|
46
|
+
|
47
|
+
def struct_fields; FIELDS; end
|
48
|
+
|
49
|
+
def validate
|
50
|
+
end
|
51
|
+
|
52
|
+
::Thrift::Struct.generate_accessors self
|
53
|
+
::Thrift.register_struct_type self
|
54
|
+
end
|
55
|
+
|
56
|
+
class Identity_result
|
57
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
58
|
+
|
59
|
+
NAME = 'identity_result'.freeze
|
60
|
+
NAMESPACE = ''.freeze
|
61
|
+
|
62
|
+
LEGACY_ANNOTATIONS = {
|
63
|
+
}.freeze
|
64
|
+
|
65
|
+
STRUCTURED_ANNOTATIONS = [
|
66
|
+
].freeze
|
67
|
+
|
68
|
+
THRIFT_FIELD_INDEX_SUCCESS = 0
|
69
|
+
|
70
|
+
THRIFT_FIELD_SUCCESS_LEGACY_ANNOTATIONS = {
|
71
|
+
}.freeze
|
72
|
+
|
73
|
+
THRIFT_FIELD_SUCCESS_STRUCTURED_ANNOTATIONS = [
|
74
|
+
].freeze
|
75
|
+
|
76
|
+
FIELDS = {
|
77
|
+
THRIFT_FIELD_INDEX_SUCCESS => {type: ::Thrift::Types::I32, name: 'success', legacy_annotations: THRIFT_FIELD_SUCCESS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SUCCESS_STRUCTURED_ANNOTATIONS}
|
78
|
+
}
|
79
|
+
|
80
|
+
def struct_fields; FIELDS; end
|
81
|
+
|
82
|
+
def validate
|
83
|
+
end
|
84
|
+
|
85
|
+
::Thrift::Struct.generate_accessors self
|
86
|
+
::Thrift.register_struct_type self
|
87
|
+
end
|
88
|
+
|
89
|
+
class Client < ::Srv::Client
|
90
|
+
def initialize(client)
|
91
|
+
@client = ::Thrift.build_client(client)
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.from_provider(provider)
|
95
|
+
Client.new(provider.build(NAMESPACE, SERVICE))
|
96
|
+
end
|
97
|
+
|
98
|
+
def identity(arg)
|
99
|
+
result = @client.call_binary(
|
100
|
+
'identity',
|
101
|
+
Identity_args.new(arg: arg),
|
102
|
+
Identity_result
|
103
|
+
)
|
104
|
+
|
105
|
+
return result.success unless result.success.nil?
|
106
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'identity failed: unknown result')
|
107
|
+
result
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
class Processor < ::Srv::Processor
|
113
|
+
include ::Thrift::Processor
|
114
|
+
|
115
|
+
def self.from_provider(handler, provider)
|
116
|
+
provider.build(NAMESPACE, SERVICE, Processor, handler)
|
117
|
+
end
|
118
|
+
|
119
|
+
THRIFT_METHOD_IDENTITY_LEGACY_ANNOTATIONS = {
|
120
|
+
}.freeze
|
121
|
+
|
122
|
+
THRIFT_METHOD_IDENTITY_STRUCTURED_ANNOTATIONS = [
|
123
|
+
].freeze
|
124
|
+
|
125
|
+
METHODS = {
|
126
|
+
'identity' => { args_klass: Identity_args, oneway: false, legacy_annotations: THRIFT_METHOD_IDENTITY_STRUCTURED_ANNOTATIONS, structured_annotations: THRIFT_METHOD_IDENTITY_STRUCTURED_ANNOTATIONS},
|
127
|
+
}.freeze
|
128
|
+
|
129
|
+
def execute_identity(args)
|
130
|
+
result = Identity_result.new()
|
131
|
+
|
132
|
+
result.success = @handler.identity(args.arg)
|
133
|
+
|
134
|
+
result
|
135
|
+
end
|
136
|
+
|
137
|
+
def process_identity(seqid, iprot, oprot)
|
138
|
+
args = read_args(iprot, Identity_args)
|
139
|
+
result = @middleware.handle_binary('identity', args) do |args|
|
140
|
+
execute_identity(args)
|
141
|
+
end
|
142
|
+
|
143
|
+
write_result(result, oprot, 'identity', seqid)
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
::Thrift.register_service_type(self)
|
149
|
+
|
150
|
+
end
|
151
|
+
|
@@ -0,0 +1,165 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler ()
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'debug_proto_test_types'
|
9
|
+
|
10
|
+
module ReverseOrderService
|
11
|
+
SERVICE = 'ReverseOrderService'.freeze
|
12
|
+
NAMESPACE = ''.freeze
|
13
|
+
|
14
|
+
LEGACY_ANNOTATIONS = {
|
15
|
+
}.freeze
|
16
|
+
|
17
|
+
STRUCTURED_ANNOTATIONS = [
|
18
|
+
].freeze
|
19
|
+
|
20
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
21
|
+
|
22
|
+
class MyMethod_args
|
23
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
24
|
+
|
25
|
+
NAME = 'myMethod_args'.freeze
|
26
|
+
NAMESPACE = ''.freeze
|
27
|
+
|
28
|
+
LEGACY_ANNOTATIONS = {
|
29
|
+
}.freeze
|
30
|
+
|
31
|
+
STRUCTURED_ANNOTATIONS = [
|
32
|
+
].freeze
|
33
|
+
|
34
|
+
THRIFT_FIELD_INDEX_FIRST = 4
|
35
|
+
THRIFT_FIELD_INDEX_SECOND = 3
|
36
|
+
THRIFT_FIELD_INDEX_THIRD = 2
|
37
|
+
THRIFT_FIELD_INDEX_FOURTH = 1
|
38
|
+
|
39
|
+
THRIFT_FIELD_FIRST_LEGACY_ANNOTATIONS = {
|
40
|
+
}.freeze
|
41
|
+
|
42
|
+
THRIFT_FIELD_FIRST_STRUCTURED_ANNOTATIONS = [
|
43
|
+
].freeze
|
44
|
+
|
45
|
+
THRIFT_FIELD_SECOND_LEGACY_ANNOTATIONS = {
|
46
|
+
}.freeze
|
47
|
+
|
48
|
+
THRIFT_FIELD_SECOND_STRUCTURED_ANNOTATIONS = [
|
49
|
+
].freeze
|
50
|
+
|
51
|
+
THRIFT_FIELD_THIRD_LEGACY_ANNOTATIONS = {
|
52
|
+
}.freeze
|
53
|
+
|
54
|
+
THRIFT_FIELD_THIRD_STRUCTURED_ANNOTATIONS = [
|
55
|
+
].freeze
|
56
|
+
|
57
|
+
THRIFT_FIELD_FOURTH_LEGACY_ANNOTATIONS = {
|
58
|
+
}.freeze
|
59
|
+
|
60
|
+
THRIFT_FIELD_FOURTH_STRUCTURED_ANNOTATIONS = [
|
61
|
+
].freeze
|
62
|
+
|
63
|
+
FIELDS = {
|
64
|
+
THRIFT_FIELD_INDEX_FIRST => {type: ::Thrift::Types::STRING, name: 'first', legacy_annotations: THRIFT_FIELD_FIRST_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_FIRST_STRUCTURED_ANNOTATIONS},
|
65
|
+
THRIFT_FIELD_INDEX_SECOND => {type: ::Thrift::Types::I16, name: 'second', legacy_annotations: THRIFT_FIELD_SECOND_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SECOND_STRUCTURED_ANNOTATIONS},
|
66
|
+
THRIFT_FIELD_INDEX_THIRD => {type: ::Thrift::Types::I32, name: 'third', legacy_annotations: THRIFT_FIELD_THIRD_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_THIRD_STRUCTURED_ANNOTATIONS},
|
67
|
+
THRIFT_FIELD_INDEX_FOURTH => {type: ::Thrift::Types::I64, name: 'fourth', legacy_annotations: THRIFT_FIELD_FOURTH_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_FOURTH_STRUCTURED_ANNOTATIONS}
|
68
|
+
}
|
69
|
+
|
70
|
+
def struct_fields; FIELDS; end
|
71
|
+
|
72
|
+
def validate
|
73
|
+
end
|
74
|
+
|
75
|
+
::Thrift::Struct.generate_accessors self
|
76
|
+
::Thrift.register_struct_type self
|
77
|
+
end
|
78
|
+
|
79
|
+
class MyMethod_result
|
80
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
81
|
+
|
82
|
+
NAME = 'myMethod_result'.freeze
|
83
|
+
NAMESPACE = ''.freeze
|
84
|
+
|
85
|
+
LEGACY_ANNOTATIONS = {
|
86
|
+
}.freeze
|
87
|
+
|
88
|
+
STRUCTURED_ANNOTATIONS = [
|
89
|
+
].freeze
|
90
|
+
|
91
|
+
|
92
|
+
FIELDS = {
|
93
|
+
|
94
|
+
}
|
95
|
+
|
96
|
+
def struct_fields; FIELDS; end
|
97
|
+
|
98
|
+
def validate
|
99
|
+
end
|
100
|
+
|
101
|
+
::Thrift::Struct.generate_accessors self
|
102
|
+
::Thrift.register_struct_type self
|
103
|
+
end
|
104
|
+
|
105
|
+
class Client
|
106
|
+
def initialize(client)
|
107
|
+
@client = ::Thrift.build_client(client)
|
108
|
+
end
|
109
|
+
|
110
|
+
def self.from_provider(provider)
|
111
|
+
Client.new(provider.build(NAMESPACE, SERVICE))
|
112
|
+
end
|
113
|
+
|
114
|
+
def myMethod(first, second, third, fourth)
|
115
|
+
result = @client.call_binary(
|
116
|
+
'myMethod',
|
117
|
+
MyMethod_args.new(first: first, second: second, third: third, fourth: fourth),
|
118
|
+
MyMethod_result
|
119
|
+
)
|
120
|
+
|
121
|
+
nil
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
class Processor
|
127
|
+
include ::Thrift::Processor
|
128
|
+
|
129
|
+
def self.from_provider(handler, provider)
|
130
|
+
provider.build(NAMESPACE, SERVICE, Processor, handler)
|
131
|
+
end
|
132
|
+
|
133
|
+
THRIFT_METHOD_MYMETHOD_LEGACY_ANNOTATIONS = {
|
134
|
+
}.freeze
|
135
|
+
|
136
|
+
THRIFT_METHOD_MYMETHOD_STRUCTURED_ANNOTATIONS = [
|
137
|
+
].freeze
|
138
|
+
|
139
|
+
METHODS = {
|
140
|
+
'myMethod' => { args_klass: MyMethod_args, oneway: false, legacy_annotations: THRIFT_METHOD_MYMETHOD_STRUCTURED_ANNOTATIONS, structured_annotations: THRIFT_METHOD_MYMETHOD_STRUCTURED_ANNOTATIONS},
|
141
|
+
}.freeze
|
142
|
+
|
143
|
+
def execute_myMethod(args)
|
144
|
+
result = MyMethod_result.new()
|
145
|
+
|
146
|
+
@handler.myMethod(args.first, args.second, args.third, args.fourth)
|
147
|
+
|
148
|
+
result
|
149
|
+
end
|
150
|
+
|
151
|
+
def process_myMethod(seqid, iprot, oprot)
|
152
|
+
args = read_args(iprot, MyMethod_args)
|
153
|
+
result = @middleware.handle_binary('myMethod', args) do |args|
|
154
|
+
execute_myMethod(args)
|
155
|
+
end
|
156
|
+
|
157
|
+
write_result(result, oprot, 'myMethod', seqid)
|
158
|
+
end
|
159
|
+
|
160
|
+
end
|
161
|
+
|
162
|
+
::Thrift.register_service_type(self)
|
163
|
+
|
164
|
+
end
|
165
|
+
|
@@ -0,0 +1,146 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler ()
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'debug_proto_test_types'
|
9
|
+
|
10
|
+
module ServiceForExceptionWithAMap
|
11
|
+
SERVICE = 'ServiceForExceptionWithAMap'.freeze
|
12
|
+
NAMESPACE = ''.freeze
|
13
|
+
|
14
|
+
LEGACY_ANNOTATIONS = {
|
15
|
+
}.freeze
|
16
|
+
|
17
|
+
STRUCTURED_ANNOTATIONS = [
|
18
|
+
].freeze
|
19
|
+
|
20
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
21
|
+
|
22
|
+
class MethodThatThrowsAnException_args
|
23
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
24
|
+
|
25
|
+
NAME = 'methodThatThrowsAnException_args'.freeze
|
26
|
+
NAMESPACE = ''.freeze
|
27
|
+
|
28
|
+
LEGACY_ANNOTATIONS = {
|
29
|
+
}.freeze
|
30
|
+
|
31
|
+
STRUCTURED_ANNOTATIONS = [
|
32
|
+
].freeze
|
33
|
+
|
34
|
+
|
35
|
+
FIELDS = {
|
36
|
+
|
37
|
+
}
|
38
|
+
|
39
|
+
def struct_fields; FIELDS; end
|
40
|
+
|
41
|
+
def validate
|
42
|
+
end
|
43
|
+
|
44
|
+
::Thrift::Struct.generate_accessors self
|
45
|
+
::Thrift.register_struct_type self
|
46
|
+
end
|
47
|
+
|
48
|
+
class MethodThatThrowsAnException_result
|
49
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
50
|
+
|
51
|
+
NAME = 'methodThatThrowsAnException_result'.freeze
|
52
|
+
NAMESPACE = ''.freeze
|
53
|
+
|
54
|
+
LEGACY_ANNOTATIONS = {
|
55
|
+
}.freeze
|
56
|
+
|
57
|
+
STRUCTURED_ANNOTATIONS = [
|
58
|
+
].freeze
|
59
|
+
|
60
|
+
THRIFT_FIELD_INDEX_XWAMAP = 1
|
61
|
+
|
62
|
+
THRIFT_FIELD_XWAMAP_LEGACY_ANNOTATIONS = {
|
63
|
+
}.freeze
|
64
|
+
|
65
|
+
THRIFT_FIELD_XWAMAP_STRUCTURED_ANNOTATIONS = [
|
66
|
+
].freeze
|
67
|
+
|
68
|
+
FIELDS = {
|
69
|
+
THRIFT_FIELD_INDEX_XWAMAP => {type: ::Thrift::Types::STRUCT, name: 'xwamap', class: ::ExceptionWithAMap, legacy_annotations: THRIFT_FIELD_XWAMAP_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_XWAMAP_STRUCTURED_ANNOTATIONS}
|
70
|
+
}
|
71
|
+
|
72
|
+
def struct_fields; FIELDS; end
|
73
|
+
|
74
|
+
def validate
|
75
|
+
end
|
76
|
+
|
77
|
+
::Thrift::Struct.generate_accessors self
|
78
|
+
::Thrift.register_struct_type self
|
79
|
+
end
|
80
|
+
|
81
|
+
class Client
|
82
|
+
def initialize(client)
|
83
|
+
@client = ::Thrift.build_client(client)
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.from_provider(provider)
|
87
|
+
Client.new(provider.build(NAMESPACE, SERVICE))
|
88
|
+
end
|
89
|
+
|
90
|
+
def methodThatThrowsAnException()
|
91
|
+
result = @client.call_binary(
|
92
|
+
'methodThatThrowsAnException',
|
93
|
+
MethodThatThrowsAnException_args.new(),
|
94
|
+
MethodThatThrowsAnException_result
|
95
|
+
)
|
96
|
+
|
97
|
+
raise result.xwamap unless result.xwamap.nil?
|
98
|
+
nil
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
class Processor
|
104
|
+
include ::Thrift::Processor
|
105
|
+
|
106
|
+
def self.from_provider(handler, provider)
|
107
|
+
provider.build(NAMESPACE, SERVICE, Processor, handler)
|
108
|
+
end
|
109
|
+
|
110
|
+
THRIFT_METHOD_METHODTHATTHROWSANEXCEPTION_LEGACY_ANNOTATIONS = {
|
111
|
+
}.freeze
|
112
|
+
|
113
|
+
THRIFT_METHOD_METHODTHATTHROWSANEXCEPTION_STRUCTURED_ANNOTATIONS = [
|
114
|
+
].freeze
|
115
|
+
|
116
|
+
METHODS = {
|
117
|
+
'methodThatThrowsAnException' => { args_klass: MethodThatThrowsAnException_args, oneway: false, legacy_annotations: THRIFT_METHOD_METHODTHATTHROWSANEXCEPTION_STRUCTURED_ANNOTATIONS, structured_annotations: THRIFT_METHOD_METHODTHATTHROWSANEXCEPTION_STRUCTURED_ANNOTATIONS},
|
118
|
+
}.freeze
|
119
|
+
|
120
|
+
def execute_methodThatThrowsAnException(args)
|
121
|
+
result = MethodThatThrowsAnException_result.new()
|
122
|
+
|
123
|
+
begin
|
124
|
+
@handler.methodThatThrowsAnException()
|
125
|
+
rescue ::ExceptionWithAMap => xwamap
|
126
|
+
result.xwamap = xwamap
|
127
|
+
end
|
128
|
+
|
129
|
+
result
|
130
|
+
end
|
131
|
+
|
132
|
+
def process_methodThatThrowsAnException(seqid, iprot, oprot)
|
133
|
+
args = read_args(iprot, MethodThatThrowsAnException_args)
|
134
|
+
result = @middleware.handle_binary('methodThatThrowsAnException', args) do |args|
|
135
|
+
execute_methodThatThrowsAnException(args)
|
136
|
+
end
|
137
|
+
|
138
|
+
write_result(result, oprot, 'methodThatThrowsAnException', seqid)
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|
142
|
+
|
143
|
+
::Thrift.register_service_type(self)
|
144
|
+
|
145
|
+
end
|
146
|
+
|