Class SaslMechanismsTypeEncoder
- java.lang.Object
-
- org.apache.qpid.protonj2.codec.encoders.AbstractDescribedTypeEncoder<V>
-
- org.apache.qpid.protonj2.codec.encoders.AbstractDescribedListTypeEncoder<SaslMechanisms>
-
- org.apache.qpid.protonj2.codec.encoders.security.SaslMechanismsTypeEncoder
-
- All Implemented Interfaces:
DescribedTypeEncoder<SaslMechanisms>,TypeEncoder<SaslMechanisms>
public final class SaslMechanismsTypeEncoder extends AbstractDescribedListTypeEncoder<SaslMechanisms>
Encoder of AMQP SaslMechanisms type values to a byte stream
-
-
Constructor Summary
Constructors Constructor Description SaslMechanismsTypeEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnsignedLonggetDescriptorCode()SymbolgetDescriptorSymbol()intgetElementCount(SaslMechanisms challenge)Gets the number of elements that will result when this type is encoded into an AMQP List type.intgetMinElementCount()Return the minimum number of elements that this AMQP type must provide in order to be considered a valid type.java.lang.Class<SaslMechanisms>getTypeClass()voidwriteElement(SaslMechanisms mechanisms, int index, ProtonBuffer buffer, EncoderState state)Instructs the encoder to write the element identified with the given index-
Methods inherited from class org.apache.qpid.protonj2.codec.encoders.AbstractDescribedListTypeEncoder
getListEncoding, writeArray, writeRawArray, writeType
-
Methods inherited from class org.apache.qpid.protonj2.codec.encoders.AbstractDescribedTypeEncoder
isArrayType
-
-
-
-
Method Detail
-
getTypeClass
public java.lang.Class<SaslMechanisms> getTypeClass()
- Returns:
- the Class type that this encoder handles.
-
getDescriptorCode
public UnsignedLong getDescriptorCode()
- Returns:
- the UnsignedLong value to use as the Descriptor for this type.
-
getDescriptorSymbol
public Symbol getDescriptorSymbol()
- Returns:
- the Symbol value to use as the Descriptor for this type.
-
writeElement
public void writeElement(SaslMechanisms mechanisms, int index, ProtonBuffer buffer, EncoderState state)
Description copied from class:AbstractDescribedListTypeEncoderInstructs the encoder to write the element identified with the given index- Specified by:
writeElementin classAbstractDescribedListTypeEncoder<SaslMechanisms>- Parameters:
mechanisms- the source of the list elements to writeindex- the element index that needs to be writtenbuffer- the buffer to write the element tostate- the current EncoderState value to use.
-
getElementCount
public int getElementCount(SaslMechanisms challenge)
Description copied from class:AbstractDescribedListTypeEncoderGets the number of elements that will result when this type is encoded into an AMQP List type.- Specified by:
getElementCountin classAbstractDescribedListTypeEncoder<SaslMechanisms>- Parameters:
challenge- the value which will be encoded as a list type.- Returns:
- the number of elements that should comprise the encoded list.
-
getMinElementCount
public int getMinElementCount()
Description copied from class:AbstractDescribedListTypeEncoderReturn the minimum number of elements that this AMQP type must provide in order to be considered a valid type.- Overrides:
getMinElementCountin classAbstractDescribedListTypeEncoder<SaslMechanisms>- Returns:
- the minimum number of elements this type must provide.
-
-