| 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.DescribedType; |
| 28 |
import org.apache.qpid.proton.amqp.Symbol; |
| 29 |
import org.apache.qpid.proton.amqp.UnsignedByte; |
| 30 |
import org.apache.qpid.proton.amqp.UnsignedInteger; |
| 31 |
import org.apache.qpid.proton.amqp.UnsignedLong; |
| 32 |
import org.apache.qpid.proton.amqp.UnsignedShort; |
| 33 |
|
| 34 |
import java.util.Date; |
| 35 |
import java.util.List; |
| 36 |
import java.util.Map; |
| 37 |
import java.util.UUID; |
| 38 |
|
| 39 |
public interface Encoder |
| 40 |
{ |
| 41 |
void writeNull(); |
| 42 |
|
| 43 |
void writeBoolean(boolean bool); |
| 44 |
|
| 45 |
void writeBoolean(Boolean bool); |
| 46 |
|
| 47 |
void writeUnsignedByte(UnsignedByte ubyte); |
| 48 |
|
| 49 |
void writeUnsignedShort(UnsignedShort ushort); |
| 50 |
|
| 51 |
void writeUnsignedInteger(UnsignedInteger ushort); |
| 52 |
|
| 53 |
void writeUnsignedLong(UnsignedLong ulong); |
| 54 |
|
| 55 |
void writeByte(byte b); |
| 56 |
|
| 57 |
void writeByte(Byte b); |
| 58 |
|
| 59 |
void writeShort(short s); |
| 60 |
|
| 61 |
void writeShort(Short s); |
| 62 |
|
| 63 |
void writeInteger(int i); |
| 64 |
|
| 65 |
void writeInteger(Integer i); |
| 66 |
|
| 67 |
void writeLong(long l); |
| 68 |
|
| 69 |
void writeLong(Long l); |
| 70 |
|
| 71 |
void writeFloat(float f); |
| 72 |
|
| 73 |
void writeFloat(Float f); |
| 74 |
|
| 75 |
void writeDouble(double d); |
| 76 |
|
| 77 |
void writeDouble(Double d); |
| 78 |
|
| 79 |
void writeDecimal32(Decimal32 d); |
| 80 |
|
| 81 |
void writeDecimal64(Decimal64 d); |
| 82 |
|
| 83 |
void writeDecimal128(Decimal128 d); |
| 84 |
|
| 85 |
void writeCharacter(char c); |
| 86 |
|
| 87 |
void writeCharacter(Character c); |
| 88 |
|
| 89 |
void writeTimestamp(long d); |
| 90 |
void writeTimestamp(Date d); |
| 91 |
|
| 92 |
void writeUUID(UUID uuid); |
| 93 |
|
| 94 |
void writeBinary(Binary b); |
| 95 |
|
| 96 |
void writeString(String s); |
| 97 |
|
| 98 |
void writeSymbol(Symbol s); |
| 99 |
|
| 100 |
void writeList(List l); |
| 101 |
|
| 102 |
void writeMap(Map m); |
| 103 |
|
| 104 |
void writeDescribedType(DescribedType d); |
| 105 |
|
| 106 |
void writeArray(boolean[] a); |
| 107 |
void writeArray(byte[] a); |
| 108 |
void writeArray(short[] a); |
| 109 |
void writeArray(int[] a); |
| 110 |
void writeArray(long[] a); |
| 111 |
void writeArray(float[] a); |
| 112 |
void writeArray(double[] a); |
| 113 |
void writeArray(char[] a); |
| 114 |
void writeArray(Object[] a); |
| 115 |
|
| 116 |
void writeObject(Object o); |
| 117 |
|
| 118 |
<V> void register(AMQPType<V> type); |
| 119 |
|
| 120 |
AMQPType getType(Object element); |
| 121 |
} |