Module org.apache.qpid.protonj2
Class TargetTypeDecoder
java.lang.Object
org.apache.qpid.protonj2.codec.decoders.AbstractDescribedTypeDecoder<Target>
org.apache.qpid.protonj2.codec.decoders.AbstractDescribedListTypeDecoder<Target>
org.apache.qpid.protonj2.codec.decoders.messaging.TargetTypeDecoder
- All Implemented Interfaces:
DescribedTypeDecoder<Target>,StreamDescribedTypeDecoder<Target>,StreamTypeDecoder<Target>,TypeDecoder<Target>
Decoder of AMQP Target type values from a byte stream
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the AMQP descriptor code for the type this decoder reads.Returns the AMQP descriptor symbol for the type this decoder reads.protected intReturns the maximum number of elements that may appear in this list type.protected int(@return the minimum number of elements that must appear in this list type}Returns the Class that this decoder handles.protected TargetreadType(int count, InputStream stream, StreamDecoder decoder, StreamDecoderState state) Reads the actual type from the byte stream with the given number of encoded list elements populatedprotected TargetreadType(int count, ProtonBuffer buffer, Decoder decoder, DecoderState state) Reads the actual type from the byte stream with the given number of encoded list elements populatedMethods inherited from class org.apache.qpid.protonj2.codec.decoders.AbstractDescribedListTypeDecoder
readArrayElements, readArrayElements, readSingle, readSingle, readValue, readValue, skipValue, skipValueMethods inherited from class org.apache.qpid.protonj2.codec.decoders.AbstractDescribedTypeDecoder
checkIsExpectedType, checkIsExpectedType, checkIsExpectedTypeAndCast, checkIsExpectedTypeAndCast, isArrayType, isNull, isPrimitive, readSize, readSize, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.qpid.protonj2.codec.DescribedTypeDecoder
decoderRegistered
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
TargetTypeDecoder
public TargetTypeDecoder()
-
-
Method Details
-
getTypeClass
Description copied from interface:TypeDecoderReturns the Class that this decoder handles.- Returns:
- the Class that this decoder handles
-
getDescriptorCode
Description copied from interface:DescribedTypeDecoderReturns the AMQP descriptor code for the type this decoder reads.- Returns:
- an unsigned long descriptor code value.
-
getDescriptorSymbol
Description copied from interface:DescribedTypeDecoderReturns the AMQP descriptor symbol for the type this decoder reads.- Returns:
- an symbol descriptor code value.
-
getMinListElements
protected int getMinListElements()Description copied from class:AbstractDescribedListTypeDecoder(@return the minimum number of elements that must appear in this list type}- Specified by:
getMinListElementsin classAbstractDescribedListTypeDecoder<Target>
-
getMaxListElements
protected int getMaxListElements()Description copied from class:AbstractDescribedListTypeDecoderReturns the maximum number of elements that may appear in this list type.- Specified by:
getMaxListElementsin classAbstractDescribedListTypeDecoder<Target>- Returns:
- the maximum number of elements that may appear in this list type
-
readType
protected Target readType(int count, ProtonBuffer buffer, Decoder decoder, DecoderState state) throws DecodeException Description copied from class:AbstractDescribedListTypeDecoderReads the actual type from the byte stream with the given number of encoded list elements populated- Specified by:
readTypein classAbstractDescribedListTypeDecoder<Target>- Parameters:
count- The number of entries encoded into the list body.buffer- The source of the encoded bytes to read the value from.decoder- The list decoder that indicates the structure of the encoded lists of elements.state- The decoder state that was passed at the start of decoding.- Returns:
- a single value that is the described type this decoder reads using the given list decoder.
- Throws:
DecodeException- if an error occurs while performing the decode.
-
readType
protected Target readType(int count, InputStream stream, StreamDecoder decoder, StreamDecoderState state) throws DecodeException Description copied from class:AbstractDescribedListTypeDecoderReads the actual type from the byte stream with the given number of encoded list elements populated- Specified by:
readTypein classAbstractDescribedListTypeDecoder<Target>- Parameters:
count- The number of entries encoded into the list body.stream- The source of the encoded bytes to read the value from.decoder- The list decoder that indicates the structure of the encoded lists of elements.state- The decoder state that was passed at the start of decoding.- Returns:
- a single value that is the described type this decoder reads using the given list decoder.
- Throws:
DecodeException- if an error occurs while performing the decode.
-