Debian Codegraph @

proton-j/src/main/java/org/apache/qpid/proton/codec/Decoder.java

raw
1 /*
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21 package org.apache.qpid.proton.codec;
22
23 import org.apache.qpid.proton.amqp.Binary;
24 import org.apache.qpid.proton.amqp.Decimal128;
25 import org.apache.qpid.proton.amqp.Decimal32;
26 import org.apache.qpid.proton.amqp.Decimal64;
27 import org.apache.qpid.proton.amqp.Symbol;
28 import org.apache.qpid.proton.amqp.UnsignedByte;
29 import org.apache.qpid.proton.amqp.UnsignedInteger;
30 import org.apache.qpid.proton.amqp.UnsignedLong;
31 import org.apache.qpid.proton.amqp.UnsignedShort;
32
33 import java.util.Date;
34 import java.util.List;
35 import java.util.Map;
36 import java.util.UUID;
37
38 public interface Decoder
39 {
40 public static interface ListProcessor<T>
41 {
42 T process(int count, Encoder encoder);
43 }
44
45
46 Boolean readBoolean();
47 Boolean readBoolean(Boolean defaultVal);
48 boolean readBoolean(boolean defaultVal);
49
50 Byte readByte();
51 Byte readByte(Byte defaultVal);
52 byte readByte(byte defaultVal);
53
54 Short readShort();
55 Short readShort(Short defaultVal);
56 short readShort(short defaultVal);
57
58 Integer readInteger();
59 Integer readInteger(Integer defaultVal);
60 int readInteger(int defaultVal);
61
62 Long readLong();
63 Long readLong(Long defaultVal);
64 long readLong(long defaultVal);
65
66 UnsignedByte readUnsignedByte();
67 UnsignedByte readUnsignedByte(UnsignedByte defaultVal);
68
69 UnsignedShort readUnsignedShort();
70 UnsignedShort readUnsignedShort(UnsignedShort defaultVal);
71
72 UnsignedInteger readUnsignedInteger();
73 UnsignedInteger readUnsignedInteger(UnsignedInteger defaultVal);
74
75 UnsignedLong readUnsignedLong();
76 UnsignedLong readUnsignedLong(UnsignedLong defaultVal);
77
78 Character readCharacter();
79 Character readCharacter(Character defaultVal);
80 char readCharacter(char defaultVal);
81
82 Float readFloat();
83 Float readFloat(Float defaultVal);
84 float readFloat(float defaultVal);
85
86 Double readDouble();
87 Double readDouble(Double defaultVal);
88 double readDouble(double defaultVal);
89
90 UUID readUUID();
91 UUID readUUID(UUID defaultValue);
92
93 Decimal32 readDecimal32();
94 Decimal32 readDecimal32(Decimal32 defaultValue);
95
96 Decimal64 readDecimal64();
97 Decimal64 readDecimal64(Decimal64 defaultValue);
98
99 Decimal128 readDecimal128();
100 Decimal128 readDecimal128(Decimal128 defaultValue);
101
102 Date readTimestamp();
103 Date readTimestamp(Date defaultValue);
104
105 Binary readBinary();
106 Binary readBinary(Binary defaultValue);
107
108 Symbol readSymbol();
109 Symbol readSymbol(Symbol defaultValue);
110
111 String readString();
112 String readString(String defaultValue);
113
114 List readList();
115 <T> void readList(ListProcessor<T> processor);
116
117 Map readMap();
118
119 <T> T[] readArray(Class<T> clazz);
120
121 Object[] readArray();
122
123 boolean[] readBooleanArray();
124 byte[] readByteArray();
125 short[] readShortArray();
126 int[] readIntegerArray();
127 long[] readLongArray();
128 float[] readFloatArray();
129 double[] readDoubleArray();
130 char[] readCharacterArray();
131
132 <T> T[] readMultiple(Class<T> clazz);
133
134 Object[] readMultiple();
135 byte[] readByteMultiple();
136 short[] readShortMultiple();
137 int[] readIntegerMultiple();
138 long[] readLongMultiple();
139 float[] readFloatMultiple();
140 double[] readDoubleMultiple();
141 char[] readCharacterMultiple();
142
143 Object readObject();
144 Object readObject(Object defaultValue);
145
146 void register(final Object descriptor, final DescribedTypeConstructor dtc);
147
148 void register(final Object descriptor, final FastPathDescribedTypeConstructor<?> dtc);
149
150 }