Class: Thrift::MultiplexedProtocol

Inherits:
BaseProtocol
  • Object
show all
Defined in:
lib/thrift_client/thrift.rb

Instance Method Summary collapse

Constructor Details

#initialize(protocol, service_name) ⇒ MultiplexedProtocol

Returns a new instance of MultiplexedProtocol.



75
76
77
78
# File 'lib/thrift_client/thrift.rb', line 75

def initialize(protocol,service_name)
  @protocol = protocol
  @service_name = service_name
end

Instance Method Details

#read_binaryObject



249
250
251
# File 'lib/thrift_client/thrift.rb', line 249

def read_binary
  @protocol.read_binary
end

#read_boolObject



221
222
223
# File 'lib/thrift_client/thrift.rb', line 221

def read_bool
  @protocol.read_bool
end

#read_byteObject



225
226
227
# File 'lib/thrift_client/thrift.rb', line 225

def read_byte
  @protocol.read_byte
end

#read_doubleObject



241
242
243
# File 'lib/thrift_client/thrift.rb', line 241

def read_double
  @protocol.read_double
end

#read_field_beginObject



189
190
191
# File 'lib/thrift_client/thrift.rb', line 189

def read_field_begin
  @protocol.read_field_begin
end

#read_field_endObject



193
194
195
# File 'lib/thrift_client/thrift.rb', line 193

def read_field_end
  @protocol.read_field_end
end

#read_i16Object



229
230
231
# File 'lib/thrift_client/thrift.rb', line 229

def read_i16
  @protocol.read_i16
end

#read_i32Object



233
234
235
# File 'lib/thrift_client/thrift.rb', line 233

def read_i32
  @protocol.read_i32
end

#read_i64Object



237
238
239
# File 'lib/thrift_client/thrift.rb', line 237

def read_i64
  @protocol.read_i64
end

#read_list_beginObject



205
206
207
# File 'lib/thrift_client/thrift.rb', line 205

def read_list_begin
  @protocol.read_list_begin
end

#read_list_endObject



209
210
211
# File 'lib/thrift_client/thrift.rb', line 209

def read_list_end
  @protocol.read_list_end
end

#read_map_beginObject



197
198
199
# File 'lib/thrift_client/thrift.rb', line 197

def read_map_begin
  @protocol.read_map_begin
end

#read_map_endObject



201
202
203
# File 'lib/thrift_client/thrift.rb', line 201

def read_map_end
  @protocol.read_map_end
end

#read_message_beginObject



173
174
175
# File 'lib/thrift_client/thrift.rb', line 173

def read_message_begin
  @protocol.read_message_begin
end

#read_message_endObject



177
178
179
# File 'lib/thrift_client/thrift.rb', line 177

def read_message_end
  @protocol.read_message_end
end

#read_set_beginObject



213
214
215
# File 'lib/thrift_client/thrift.rb', line 213

def read_set_begin
  @protocol.read_set_begin
end

#read_set_endObject



217
218
219
# File 'lib/thrift_client/thrift.rb', line 217

def read_set_end
  @protocol.read_set_end
end

#read_stringObject



245
246
247
# File 'lib/thrift_client/thrift.rb', line 245

def read_string
  @protocol.read_string
end

#read_struct_beginObject



181
182
183
# File 'lib/thrift_client/thrift.rb', line 181

def read_struct_begin
  @protocol.read_struct_begin
end

#read_struct_endObject



185
186
187
# File 'lib/thrift_client/thrift.rb', line 185

def read_struct_end
  @protocol.read_struct_end
end

#transObject



80
81
82
# File 'lib/thrift_client/thrift.rb', line 80

def trans
  @protocol.trans
end

#write_binary(buf) ⇒ Object



169
170
171
# File 'lib/thrift_client/thrift.rb', line 169

def write_binary(buf)
  @protocol.write_binary(buf)
end

#write_bool(bool) ⇒ Object



141
142
143
# File 'lib/thrift_client/thrift.rb', line 141

def write_bool(bool)
  @protocol.write_bool(bool)
end

#write_byte(byte) ⇒ Object



145
146
147
# File 'lib/thrift_client/thrift.rb', line 145

def write_byte(byte)
  @protocol.write_byte(byte)
end

#write_double(dub) ⇒ Object



161
162
163
# File 'lib/thrift_client/thrift.rb', line 161

def write_double(dub)
  @protocol.write_double(dub)
end

#write_field_begin(name, type, id) ⇒ Object



105
106
107
# File 'lib/thrift_client/thrift.rb', line 105

def write_field_begin(name, type, id)
  @protocol.write_field_begin(name, type, id)
end

#write_field_endObject



109
110
111
# File 'lib/thrift_client/thrift.rb', line 109

def write_field_end
  @protocol.write_field_end
end

#write_field_stopObject



113
114
115
# File 'lib/thrift_client/thrift.rb', line 113

def write_field_stop
  @protocol.write_field_stop
end

#write_i16(i16) ⇒ Object



149
150
151
# File 'lib/thrift_client/thrift.rb', line 149

def write_i16(i16)
  @protocol.write_i16(i16)
end

#write_i32(i32) ⇒ Object



153
154
155
# File 'lib/thrift_client/thrift.rb', line 153

def write_i32(i32)
  @protocol.write_i32(i32)
end

#write_i64(i64) ⇒ Object



157
158
159
# File 'lib/thrift_client/thrift.rb', line 157

def write_i64(i64)
  @protocol.write_i64(i64)
end

#write_list_begin(etype, size) ⇒ Object



125
126
127
# File 'lib/thrift_client/thrift.rb', line 125

def write_list_begin(etype, size)
  @protocol.write_list_begin(etype, size)
end

#write_list_endObject



129
130
131
# File 'lib/thrift_client/thrift.rb', line 129

def write_list_end
  @protocol.write_list_end
end

#write_map_begin(ktype, vtype, size) ⇒ Object



117
118
119
# File 'lib/thrift_client/thrift.rb', line 117

def write_map_begin(ktype, vtype, size)
  @protocol.write_map_begin(ktype, vtype, size)
end

#write_map_endObject



121
122
123
# File 'lib/thrift_client/thrift.rb', line 121

def write_map_end
  @protocol.write_map_end
end

#write_message_begin(name, type, seqid) ⇒ Object



84
85
86
87
88
89
90
91
# File 'lib/thrift_client/thrift.rb', line 84

def write_message_begin(name, type, seqid)
  case type
  when MessageTypes::CALL, MessageTypes::ONEWAY
    @protocol.write_message_begin(@service_name + ":" + name, type, seqid)
  else
    @protocol.write_message_begin(name, type, seqid)
  end 
end

#write_message_endObject



93
94
95
# File 'lib/thrift_client/thrift.rb', line 93

def write_message_end
  @protocol.write_message_end
end

#write_set_begin(etype, size) ⇒ Object



133
134
135
# File 'lib/thrift_client/thrift.rb', line 133

def write_set_begin(etype, size)
  @protocol.write_set_begin(etype, size)
end

#write_set_endObject



137
138
139
# File 'lib/thrift_client/thrift.rb', line 137

def write_set_end
  @protocol.write_set_end
end

#write_string(str) ⇒ Object



165
166
167
# File 'lib/thrift_client/thrift.rb', line 165

def write_string(str)
  @protocol.write_string(str)
end

#write_struct_begin(name) ⇒ Object



97
98
99
# File 'lib/thrift_client/thrift.rb', line 97

def write_struct_begin(name)
  @protocol.write_struct_begin(name)
end

#write_struct_endObject



101
102
103
# File 'lib/thrift_client/thrift.rb', line 101

def write_struct_end
  @protocol.write_struct_end
end