Enum AMQType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<AMQType>

    public enum AMQType
    extends java.lang.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.
    • Enum Constant Detail

      • LONG_STRING

        public static final AMQType LONG_STRING
      • INTEGER

        public static final AMQType INTEGER
      • DECIMAL

        public static final AMQType DECIMAL
      • TIMESTAMP

        public static final AMQType TIMESTAMP
      • FIELD_TABLE

        public static final AMQType FIELD_TABLE
        Implements the field table type. The native value of a field table type will be an instance of FieldTable, which itself may contain name/value pairs encoded as AMQTypedValues.
      • FIELD_ARRAY

        public static final AMQType FIELD_ARRAY
        Implements the field table type. The native value of a field table type will be an instance of FieldTable, which itself may contain name/value pairs encoded as AMQTypedValues.
      • VOID

        public static final AMQType VOID
      • BINARY

        public static final AMQType BINARY
      • ASCII_STRING

        public static final AMQType ASCII_STRING
      • WIDE_STRING

        public static final AMQType WIDE_STRING
      • BOOLEAN

        public static final AMQType BOOLEAN
      • ASCII_CHARACTER

        public static final AMQType ASCII_CHARACTER
      • BYTE

        public static final AMQType BYTE
      • UNSIGNED_BYTE

        public static final AMQType UNSIGNED_BYTE
      • SHORT

        public static final AMQType SHORT
      • UNSIGNED_SHORT

        public static final AMQType UNSIGNED_SHORT
      • INT

        public static final AMQType INT
      • LONG

        public static final AMQType LONG
      • FLOAT

        public static final AMQType FLOAT
      • DOUBLE

        public static final AMQType DOUBLE
    • Method Detail

      • values

        public static AMQType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AMQType c : AMQType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AMQType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • identifier

        public final byte identifier()
        Extracts the byte identifier for the typ.
        Returns:
        The byte identifier for the typ.
      • getEncodingSize

        public abstract int getEncodingSize​(java.lang.Object value)
        Calculates the size of an instance of the type in bytes.
        Parameters:
        value - An instance of the type.
        Returns:
        The size of the instance of the type in bytes.
      • toNativeValue

        public abstract java.lang.Object toNativeValue​(java.lang.Object value)
        Converts an instance of the type to an equivalent Java native representation.
        Parameters:
        value - An instance of the type.
        Returns:
        An equivalent Java native representation.
      • asTypedValue

        public AMQTypedValue asTypedValue​(java.lang.Object value)
        Converts an instance of the type to an equivalent Java native representation, packaged as an AMQTypedValue tagged with its AMQP type.
        Parameters:
        value - An instance of the type.
        Returns:
        An equivalent Java native representation, tagged with its AMQP type.
      • writeToBuffer

        public void writeToBuffer​(java.lang.Object value,
                                  org.apache.qpid.server.bytebuffer.QpidByteBuffer buffer)