Class DeliveryTagEncoder
- java.lang.Object
-
- org.apache.qpid.protonj2.codec.encoders.DeliveryTagEncoder
-
- All Implemented Interfaces:
TypeEncoder<DeliveryTag>
public final class DeliveryTagEncoder extends java.lang.Object implements TypeEncoder<DeliveryTag>
Custom encoder for writing DeliveryTag types to aProtonBuffer.
-
-
Constructor Summary
Constructors Constructor Description DeliveryTagEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<DeliveryTag>getTypeClass()booleanisArrayType()voidwriteArray(ProtonBuffer buffer, EncoderState state, java.lang.Object[] values)Write an array elements of the AMQP type to the given byte buffer.voidwriteRawArray(ProtonBuffer buffer, EncoderState state, java.lang.Object[] values)Write an array elements of the AMQP type to the given byte buffer.voidwriteType(ProtonBuffer buffer, EncoderState state, DeliveryTag value)Write the full AMQP type data to the given byte buffer.
-
-
-
Method Detail
-
getTypeClass
public java.lang.Class<DeliveryTag> getTypeClass()
- Specified by:
getTypeClassin interfaceTypeEncoder<DeliveryTag>- Returns:
- the Class type that this encoder handles.
-
isArrayType
public boolean isArrayType()
- Specified by:
isArrayTypein interfaceTypeEncoder<DeliveryTag>- Returns:
- true if the type handled by this encoded is an AMQP Array type.
-
writeType
public void writeType(ProtonBuffer buffer, EncoderState state, DeliveryTag value)
Description copied from interface:TypeEncoderWrite the full AMQP type data to the given byte buffer.This can consist of writing both a type constructor value and the bytes that make up the value of the type being written.
- Specified by:
writeTypein interfaceTypeEncoder<DeliveryTag>- Parameters:
buffer- The buffer to write the AMQP type tostate- The current encoder statevalue- The value that is to be written.
-
writeArray
public void writeArray(ProtonBuffer buffer, EncoderState state, java.lang.Object[] values)
Description copied from interface:TypeEncoderWrite an array elements of the AMQP type to the given byte buffer.This method writes the full Array type definition of an array of the type this encoder manages.
- Specified by:
writeArrayin interfaceTypeEncoder<DeliveryTag>- Parameters:
buffer- The buffer to write the AMQP array elements tostate- The current encoder statevalues- The array of values that is to be written.
-
writeRawArray
public void writeRawArray(ProtonBuffer buffer, EncoderState state, java.lang.Object[] values)
Description copied from interface:TypeEncoderWrite an array elements of the AMQP type to the given byte buffer.This method writes only the body portion of an AMQP array of this type, the array encoding, size and element count should be assumed to be managed by the caller.
- Specified by:
writeRawArrayin interfaceTypeEncoder<DeliveryTag>- Parameters:
buffer- The buffer to write the AMQP array elements tostate- The current encoder statevalues- The array of values that is to be written.
-
-