Module org.apache.qpid.protonj2
Class SaslMechanismsTypeEncoder
java.lang.Object
org.apache.qpid.protonj2.codec.encoders.AbstractDescribedTypeEncoder<SaslMechanisms>
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetElementCount(SaslMechanisms challenge) Gets the number of elements that will result when this type is encoded into an AMQP List type.intReturns the maximum number of elements the list body of the described type can carry and is used as a sanity check during encode.intReturn the minimum number of elements that this AMQP type must provide in order to be considered a valid type.voidwriteElements(SaslMechanisms mechanisms, int count, ProtonBuffer buffer, Encoder encoder, EncoderState state) Instructs the encoder to write the elements identified with the given count which should match what it reports as the required number needed for this encoding.Methods inherited from class org.apache.qpid.protonj2.codec.encoders.AbstractDescribedListTypeEncoder
getListEncoding, 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
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
SaslMechanismsTypeEncoder
public SaslMechanismsTypeEncoder()
-
-
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.
-
getElementCount
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.
-
getMaxElementCount
public int getMaxElementCount()Description copied from class:AbstractDescribedListTypeEncoderReturns the maximum number of elements the list body of the described type can carry and is used as a sanity check during encode.- Specified by:
getMaxElementCountin classAbstractDescribedListTypeEncoder<SaslMechanisms>- Returns:
- the maximum number of elements the described type can carry.
-
writeElements
public void writeElements(SaslMechanisms mechanisms, int count, ProtonBuffer buffer, Encoder encoder, EncoderState state) Description copied from class:AbstractDescribedListTypeEncoderInstructs the encoder to write the elements identified with the given count which should match what it reports as the required number needed for this encoding.- Specified by:
writeElementsin classAbstractDescribedListTypeEncoder<SaslMechanisms>- Parameters:
mechanisms- the source of the list elements to writecount- the number of elements that are to be encoded for this typebuffer- the buffer to write the element toencoder- the current Encoder value to use.state- the current EncoderState value to use.
-