public enum AMQType extends Enum<AMQType>
Enum Constant and Description |
---|
ASCII_CHARACTER |
ASCII_STRING |
BINARY |
BOOLEAN |
BYTE |
DECIMAL |
DOUBLE |
FIELD_ARRAY
Implements the field table type.
|
FIELD_TABLE
Implements the field table type.
|
FLOAT |
INT |
INTEGER |
LONG |
LONG_STRING |
SHORT |
TIMESTAMP |
VOID |
WIDE_STRING |
Modifier and Type | Method and Description |
---|---|
AMQTypedValue |
asTypedValue(Object value)
Converts an instance of the type to an equivalent Java native representation, packaged as an
AMQTypedValue tagged with its AMQP type. |
abstract int |
getEncodingSize(Object value)
Calculates the size of an instance of the type in bytes.
|
byte |
identifier()
Extracts the byte identifier for the typ.
|
abstract Object |
toNativeValue(Object value)
Converts an instance of the type to an equivalent Java native representation.
|
static AMQType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AMQType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
writeToBuffer(Object value,
DataOutput buffer)
Writes an instance of the type to a specified byte buffer, preceded by its one byte identifier.
|
public static final AMQType LONG_STRING
public static final AMQType INTEGER
public static final AMQType DECIMAL
public static final AMQType TIMESTAMP
public static final AMQType FIELD_TABLE
FieldTable
, which itself may contain name/value pairs encoded as AMQTypedValue
s.public static final AMQType FIELD_ARRAY
FieldTable
, which itself may contain name/value pairs encoded as AMQTypedValue
s.public static final AMQType VOID
public static final AMQType BINARY
public static final AMQType ASCII_STRING
public static final AMQType WIDE_STRING
public static final AMQType BOOLEAN
public static final AMQType ASCII_CHARACTER
public static final AMQType BYTE
public static final AMQType SHORT
public static final AMQType INT
public static final AMQType LONG
public static final AMQType FLOAT
public static final AMQType DOUBLE
public static AMQType[] values()
for (AMQType c : AMQType.values()) System.out.println(c);
public static AMQType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final byte identifier()
public abstract int getEncodingSize(Object value)
value
- An instance of the type.public abstract Object toNativeValue(Object value)
value
- An instance of the type.public AMQTypedValue asTypedValue(Object value)
AMQTypedValue
tagged with its AMQP type.value
- An instance of the type.public void writeToBuffer(Object value, DataOutput buffer) throws IOException
value
- An instance of the type.buffer
- The byte buffer to write it to.IOException
- if there is a problem writing to the bufferCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.