]>
git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/thrift/lib/javame/src/org/apache/thrift/protocol/TProtocol.java
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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
20 package org
.apache
.thrift
.protocol
;
22 import org
.apache
.thrift
.TException
;
23 import org
.apache
.thrift
.transport
.TTransport
;
26 * Protocol interface definition.
29 public abstract class TProtocol
{
32 * Prevent direct instantiation
34 private TProtocol() {}
39 protected TTransport trans_
;
44 protected TProtocol(TTransport trans
) {
51 public TTransport
getTransport() {
59 public abstract void writeMessageBegin(TMessage message
) throws TException
;
61 public abstract void writeMessageEnd() throws TException
;
63 public abstract void writeStructBegin(TStruct struct
) throws TException
;
65 public abstract void writeStructEnd() throws TException
;
67 public abstract void writeFieldBegin(TField field
) throws TException
;
69 public abstract void writeFieldEnd() throws TException
;
71 public abstract void writeFieldStop() throws TException
;
73 public abstract void writeMapBegin(TMap map
) throws TException
;
75 public abstract void writeMapEnd() throws TException
;
77 public abstract void writeListBegin(TList list
) throws TException
;
79 public abstract void writeListEnd() throws TException
;
81 public abstract void writeSetBegin(TSet set
) throws TException
;
83 public abstract void writeSetEnd() throws TException
;
85 public abstract void writeBool(boolean b
) throws TException
;
87 public void writeBool(Boolean b
) throws TException
{
88 writeBool(b
.booleanValue());
91 public abstract void writeByte(byte b
) throws TException
;
93 public void writeByte(Byte b
) throws TException
{
94 writeByte(b
.byteValue());
97 public abstract void writeI16(short i16
) throws TException
;
99 public void writeI16(Short i16
) throws TException
{
100 writeI16(i16
.shortValue());
103 public abstract void writeI32(int i32
) throws TException
;
105 public void writeI32(Integer i32
) throws TException
{
106 writeI32(i32
.intValue());
109 public abstract void writeI64(long i64
) throws TException
;
111 public void writeI64(Long i64
) throws TException
{
112 writeI64(i64
.longValue());
115 public abstract void writeDouble(double dub
) throws TException
;
117 public void writeDouble(Double d
) throws TException
{
118 writeDouble(d
.doubleValue());
121 public abstract void writeString(String str
) throws TException
;
123 public abstract void writeBinary(byte[] bin
) throws TException
;
129 public abstract TMessage
readMessageBegin() throws TException
;
131 public abstract void readMessageEnd() throws TException
;
133 public abstract TStruct
readStructBegin() throws TException
;
135 public abstract void readStructEnd() throws TException
;
137 public abstract TField
readFieldBegin() throws TException
;
139 public abstract void readFieldEnd() throws TException
;
141 public abstract TMap
readMapBegin() throws TException
;
143 public abstract void readMapEnd() throws TException
;
145 public abstract TList
readListBegin() throws TException
;
147 public abstract void readListEnd() throws TException
;
149 public abstract TSet
readSetBegin() throws TException
;
151 public abstract void readSetEnd() throws TException
;
153 public abstract boolean readBool() throws TException
;
155 public abstract byte readByte() throws TException
;
157 public abstract short readI16() throws TException
;
159 public abstract int readI32() throws TException
;
161 public abstract long readI64() throws TException
;
163 public abstract double readDouble() throws TException
;
165 public abstract String
readString() throws TException
;
167 public abstract byte[] readBinary() throws TException
;