File: protocol_decorator.rb

package info (click to toggle)
ruby-thrift 0.14.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 712 kB
  • sloc: ruby: 7,321; ansic: 1,757; makefile: 4
file content (194 lines) | stat: -rw-r--r-- 3,697 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# 
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
# 
#   http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

module Thrift
  module ProtocolDecorator

    def initialize(protocol)
      @protocol = protocol
    end

    def trans
      @protocol.trans
    end

    def write_message_begin(name, type, seqid)
      @protocol.write_message_begin
    end

    def write_message_end
      @protocol.write_message_end
    end

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

    def write_struct_end
      @protocol.write_struct_end
    end

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

    def write_field_end
      @protocol.write_field_end
    end

    def write_field_stop
      @protocol.write_field_stop
    end

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

    def write_map_end
      @protocol.write_map_end
    end

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

    def write_list_end
      @protocol.write_list_end
    end

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

    def write_set_end
      @protocol.write_set_end
    end

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

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

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

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

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

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

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

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

    def read_message_begin
      @protocol.read_message_begin
    end

    def read_message_end
      @protocol.read_message_end
    end

    def read_struct_begin
      @protocol.read_struct_begin
    end

    def read_struct_end
      @protocol.read_struct_end
    end

    def read_field_begin
      @protocol.read_field_begin
    end

    def read_field_end
      @protocol.read_field_end
    end

    def read_map_begin
      @protocol.read_map_begin
    end

    def read_map_end
      @protocol.read_map_end
    end

    def read_list_begin
      @protocol.read_list_begin
    end

    def read_list_end
      @protocol.read_list_end
    end

    def read_set_begin
      @protocol.read_set_begin
    end

    def read_set_end
      @protocol.read_set_end
    end

    def read_bool
      @protocol.read_bool
    end

    def read_byte
      @protocol.read_byte
    end

    def read_i16
      @protocol.read_i16
    end

    def read_i32
      @protocol.read_i32
    end

    def read_i64
      @protocol.read_i64
    end

    def read_double
      @protocol.read_double
    end

    def read_string
      @protocol.read_string
    end

    def read_binary
      @protocol.read_binary
    end
  end
end