]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/thrift/lib/haxe/src/org/apache/thrift/protocol/TProtocolDecorator.hx
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / thrift / lib / haxe / src / org / apache / thrift / protocol / TProtocolDecorator.hx
CommitLineData
f67539c2
TL
1/**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20package org.apache.thrift.protocol;
21
22import haxe.io.Bytes;
23import haxe.Int64;
24
25import org.apache.thrift.transport.TTransport;
26
27
28/**
29 * TProtocolDecorator forwards all requests to an enclosed TProtocol instance,
30 * providing a way to author concise concrete decorator subclasses. While it has
31 * no abstract methods, it is marked abstract as a reminder that by itself,
32 * it does not modify the behaviour of the enclosed TProtocol.
33 *
34 * See p.175 of Design Patterns (by Gamma et al.)
35 * See TMultiplexedProtocol
36 */
37class TProtocolDecorator implements TProtocol
38{
39 private var wrapped : TProtocol;
40
41 /**
42 * Encloses the specified protocol.
43 * @param protocol All operations will be forward to this protocol. Must be non-null.
44 */
45 private function new( protocol : TProtocol) // not to be instantiated, must derive a class
46 {
47 wrapped = protocol;
48 }
49
50 public function getTransport() : TTransport {
51 return wrapped.getTransport();
52 }
53
54 public function writeMessageBegin( value : TMessage) : Void {
55 wrapped.writeMessageBegin( value);
56 }
57
58 public function writeMessageEnd() : Void {
59 wrapped.writeMessageEnd();
60 }
61
62 public function writeStructBegin(value : TStruct) : Void {
63 wrapped.writeStructBegin( value);
64 }
65
66 public function writeStructEnd() : Void {
67 wrapped.writeStructEnd();
68 }
69
70 public function writeFieldBegin(value : TField) : Void {
71 wrapped.writeFieldBegin( value);
72 }
73
74 public function writeFieldEnd() : Void {
75 wrapped.writeFieldEnd();
76 }
77
78 public function writeFieldStop() : Void {
79 wrapped.writeFieldStop();
80 }
81
82 public function writeMapBegin( value : TMap) : Void {
83 wrapped.writeMapBegin( value);
84 }
85
86 public function writeMapEnd() : Void {
87 wrapped.writeMapEnd();
88 }
89
90 public function writeListBegin( value : TList) : Void {
91 wrapped.writeListBegin( value);
92 }
93
94 public function writeListEnd() : Void {
95 wrapped.writeListEnd();
96 }
97
98 public function writeSetBegin( value : TSet) : Void {
99 wrapped.writeSetBegin( value);
100 }
101
102 public function writeSetEnd() : Void {
103 wrapped.writeSetEnd();
104 }
105
106 public function writeBool(value : Bool) : Void {
107 wrapped.writeBool( value);
108 }
109
110 public function writeByte(value : Int) : Void {
111 wrapped.writeByte( value);
112 }
113
114 public function writeI16(value : Int) : Void {
115 wrapped.writeI16( value);
116 }
117
118 public function writeI32(value : Int) : Void {
119 wrapped.writeI32( value);
120 }
121
122 public function writeI64(value : haxe.Int64) : Void {
123 wrapped.writeI64( value);
124 }
125
126 public function writeDouble(value : Float) : Void {
127 wrapped.writeDouble( value);
128 }
129
130 public function writeString(value : String) : Void {
131 wrapped.writeString( value);
132 }
133
134 public function writeBinary(value : Bytes ) : Void {
135 wrapped.writeBinary( value);
136 }
137
138 public function readMessageBegin() : TMessage {
139 return wrapped.readMessageBegin();
140 }
141
142 public function readMessageEnd() : Void {
143 wrapped.readMessageEnd();
144 }
145
146 public function readStructBegin() : TStruct {
147 return wrapped.readStructBegin();
148 }
149
150 public function readStructEnd() : Void {
151 wrapped.readStructEnd();
152 }
153
154 public function readFieldBegin() : TField {
155 return wrapped.readFieldBegin();
156 }
157
158 public function readFieldEnd() : Void {
159 wrapped.readFieldEnd();
160 }
161
162 public function readMapBegin() : TMap {
163 return wrapped.readMapBegin();
164 }
165
166 public function readMapEnd() : Void {
167 wrapped.readMapEnd();
168 }
169
170 public function readListBegin() : TList {
171 return wrapped.readListBegin();
172 }
173
174 public function readListEnd() : Void {
175 wrapped.readListEnd();
176 }
177
178 public function readSetBegin() : TSet {
179 return wrapped.readSetBegin();
180 }
181
182 public function readSetEnd() : Void {
183 wrapped.readSetEnd();
184 }
185
186 public function readBool() : Bool
187 {
188 return wrapped.readBool();
189 }
190
191 public function readByte() : Int {
192 return wrapped.readByte();
193 }
194
195 public function readI16() : Int {
196 return wrapped.readI16();
197 }
198
199 public function readI32() : Int {
200 return wrapped.readI32();
201 }
202
203 public function readI64() : haxe.Int64 {
204 return wrapped.readI64();
205 }
206
207 public function readDouble() : Float {
208 return wrapped.readDouble();
209 }
210
211 public function readString() : String {
212 return wrapped.readString();
213 }
214
215 public function readBinary() : Bytes {
216 return wrapped.readBinary();
217 }
218
219 public function IncrementRecursionDepth() : Void {
220 return wrapped.IncrementRecursionDepth();
221 }
222
223 public function DecrementRecursionDepth() : Void {
224 return wrapped.DecrementRecursionDepth();
225 }
226}