Class ApplicationPropertiesTypeEncoder
java.lang.Object
org.apache.qpid.protonj2.codec.encoders.AbstractDescribedTypeEncoder<M>
org.apache.qpid.protonj2.codec.encoders.AbstractDescribedMapTypeEncoder<String,Object,ApplicationProperties>
org.apache.qpid.protonj2.codec.encoders.messaging.ApplicationPropertiesTypeEncoder
- All Implemented Interfaces:
DescribedTypeEncoder<ApplicationProperties>,TypeEncoder<ApplicationProperties>
public final class ApplicationPropertiesTypeEncoder
extends AbstractDescribedMapTypeEncoder<String,Object,ApplicationProperties>
Encoder of AMQP ApplicationProperties type values to a byte stream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetMapSize(ApplicationProperties value) Gets the number of elements that will result when this type is encoded into an AMQP Map type.booleanhasMap(ApplicationProperties value) Returns false when the value to be encoded has no Map body and can be written as a Null body type instead of a Map type.voidwriteMapEntries(ProtonBuffer buffer, Encoder encoder, EncoderState state, ApplicationProperties properties) Performs the write of the Map entries to the given buffer, the caller takes care of writing the Map preamble and tracking the final size of the written elements of the Map.Methods inherited from class org.apache.qpid.protonj2.codec.encoders.AbstractDescribedMapTypeEncoder
getMapEncoding, writeArray, writeRawArray, writeTypeMethods inherited from class org.apache.qpid.protonj2.codec.encoders.AbstractDescribedTypeEncoder
isArrayTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.qpid.protonj2.codec.DescribedTypeEncoder
encoderRegistered
-
Constructor Details
-
ApplicationPropertiesTypeEncoder
public ApplicationPropertiesTypeEncoder()
-
-
Method Details
-
getTypeClass
- Returns:
- the Class type that this encoder handles.
-
getDescriptorCode
- Returns:
- the UnsignedLong value to use as the Descriptor for this type.
-
getDescriptorSymbol
- Returns:
- the Symbol value to use as the Descriptor for this type.
-
hasMap
Description copied from class:AbstractDescribedMapTypeEncoderReturns false when the value to be encoded has no Map body and can be written as a Null body type instead of a Map type.- Specified by:
hasMapin classAbstractDescribedMapTypeEncoder<String,Object, ApplicationProperties> - Parameters:
value- the value which be encoded as a map type.- Returns:
- true if the type to be encoded has a Map body, false otherwise.
-
getMapSize
Description copied from class:AbstractDescribedMapTypeEncoderGets the number of elements that will result when this type is encoded into an AMQP Map type.- Specified by:
getMapSizein classAbstractDescribedMapTypeEncoder<String,Object, ApplicationProperties> - Parameters:
value- the value which will be encoded as a map type.- Returns:
- the number of elements that should comprise the encoded list.
-
writeMapEntries
public void writeMapEntries(ProtonBuffer buffer, Encoder encoder, EncoderState state, ApplicationProperties properties) Description copied from class:AbstractDescribedMapTypeEncoderPerforms the write of the Map entries to the given buffer, the caller takes care of writing the Map preamble and tracking the final size of the written elements of the Map.- Specified by:
writeMapEntriesin classAbstractDescribedMapTypeEncoder<String,Object, ApplicationProperties> - Parameters:
buffer- the buffer where the type should be encoded to.encoder- the current encoder.state- the current encoder state.properties- the value which will be encoded as a map type.
-