|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<AMQType>
org.apache.qpid.framing.AMQType
public enum AMQType
AMQType is a type that represents the different possible AMQP field table types. It provides operations for each of the types to perform tasks such as calculating the size of an instance of the type, converting types between AMQP and Java native types, and reading and writing instances of AMQP types in binary formats to and from byte buffers.
Responsibilities | Collaborations |
---|---|
Get the equivalent one byte identifier for a type. | |
Calculate the size of an instance of an AMQP parameter type. | EncodingUtils
|
Convert an instance of an AMQP parameter into a compatable Java object tagged with its AMQP type. | AMQTypedValue
|
Write an instance of an AMQP parameter type to a byte buffer. | EncodingUtils
|
Read an instance of an AMQP parameter from a byte buffer. | EncodingUtils
|
Enum Constant Summary | |
---|---|
ASCII_CHARACTER
|
|
ASCII_STRING
|
|
BINARY
|
|
BOOLEAN
|
|
BYTE
|
|
DECIMAL
|
|
DOUBLE
|
|
FIELD_TABLE
Implements the field table type. |
|
FLOAT
|
|
INT
|
|
INTEGER
|
|
LONG
|
|
LONG_STRING
|
|
SHORT
|
|
TIMESTAMP
|
|
VOID
|
|
WIDE_STRING
|
Method Summary | |
---|---|
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. |
(package private) abstract Object |
readValueFromBuffer(org.apache.mina.common.ByteBuffer buffer)
Reads an instance of the type from a specified byte buffer. |
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,
org.apache.mina.common.ByteBuffer buffer)
Writes an instance of the type to a specified byte buffer, preceded by its one byte identifier. |
(package private) abstract void |
writeValueImpl(Object value,
org.apache.mina.common.ByteBuffer buffer)
Writes an instance of the type to a specified byte buffer. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
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 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
Method Detail |
---|
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 name
NullPointerException
- 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, org.apache.mina.common.ByteBuffer buffer)
value
- An instance of the type.buffer
- The byte buffer to write it to.abstract void writeValueImpl(Object value, org.apache.mina.common.ByteBuffer buffer)
value
- An instance of the type.buffer
- The byte buffer to write it to.abstract Object readValueFromBuffer(org.apache.mina.common.ByteBuffer buffer)
buffer
- The byte buffer to write it to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |