Package org.apache.qpid.protonj2.engine
Class HeaderEnvelope
java.lang.Object
org.apache.qpid.protonj2.engine.PerformativeEnvelope<AMQPHeader>
org.apache.qpid.protonj2.engine.HeaderEnvelope
Envelope type that carries AMQPHeader instances
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HeaderEnvelopeA singleton instance of an AMQP header that can be used to avoid additional allocations.static final byteThe frame type marker used when decoding or encoding AMQP Header frames.static final HeaderEnvelopeA singleton instance of an SASL header that can be used to avoid additional allocations.
- 
Constructor SummaryConstructorsConstructorDescriptionHeaderEnvelope(AMQPHeader body) Create an header envelope with the given AMQHeader body.
- 
Method SummaryModifier and TypeMethodDescriptionintgetMajor()intgetMinor()intint<E> voidinvoke(AMQPHeader.HeaderHandler<E> handler, E context) Invoke the correct handler based on whether this header is a SASL or AMQP header instance.booleanMethods inherited from class org.apache.qpid.protonj2.engine.PerformativeEnvelopegetBody, getChannel, getFrameType, getPayload, toString
- 
Field Details- 
HEADER_FRAME_TYPEpublic static final byte HEADER_FRAME_TYPEThe frame type marker used when decoding or encoding AMQP Header frames.- See Also:
 
- 
SASL_HEADER_ENVELOPEA singleton instance of an SASL header that can be used to avoid additional allocations.
- 
AMQP_HEADER_ENVELOPEA singleton instance of an AMQP header that can be used to avoid additional allocations.
 
- 
- 
Constructor Details- 
HeaderEnvelopeCreate an header envelope with the given AMQHeader body.- Parameters:
- body- The AMQP header instance that holds the header bytes.
 
 
- 
- 
Method Details- 
getProtocolIdpublic int getProtocolId()- Returns:
- the protocol id value contained in the header bytes.
 
- 
getMajorpublic int getMajor()- Returns:
- the major version number contained in the header bytes.
 
- 
getMinorpublic int getMinor()- Returns:
- the minor version number contained in the header bytes.
 
- 
getRevisionpublic int getRevision()- Returns:
- the revision version number contained in the header bytes.
 
- 
isSaslHeaderpublic boolean isSaslHeader()- Returns:
- true if the contained header bytes represents a SASL header.
 
- 
invokeInvoke the correct handler based on whether this header is a SASL or AMQP header instance.- Type Parameters:
- E- The type of the context object that accompanies the invocation.
- Parameters:
- handler- The- AMQPHeader.HeaderHandlerthat should be invoked based on the header type.
- context- The context value to provide when signaling the header handler.
 
 
-