Class ProtonFrameDecodingHandler
java.lang.Object
org.apache.qpid.protonj2.engine.impl.ProtonFrameDecodingHandler
- All Implemented Interfaces:
- EngineHandler,- SaslPerformative.SaslPerformativeHandler<EngineHandlerContext>
public class ProtonFrameDecodingHandler
extends Object
implements EngineHandler, SaslPerformative.SaslPerformativeHandler<EngineHandlerContext>
Handler used to parse incoming frame data input into the engine
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final byteFrame type indicator for AMQP protocol frames.static final intThe specified encoding size for the frame size value of each encoded frame.static final byteFrame type indicator for SASL protocol frames.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidengineFailed(EngineHandlerContext context, EngineFailedException failure) Called when the engine has transitioned to a failed state and cannot process any additional input or output.voidhandleOutcome(SaslOutcome saslOutcome, EngineHandlerContext context) voidhandlerAdded(EngineHandlerContext context) Called when the handler is successfully added to theEnginePipelineand will later be initialized before use.voidhandleRead(EngineHandlerContext context, ProtonBuffer buffer) Handle the read of new incoming bytes from a remote sender.voidhandleRead(EngineHandlerContext context, SASLEnvelope envelope) Handle the receipt of an incoming SASL performative based on the current state of this handler.voidhandleWrite(EngineHandlerContext context, SASLEnvelope envelope) Handles write of SaslPerformative either by directly writing it to the output target or by converting it to bytes and firing a write using theProtonBufferbased API inEngineHandlerContext.fireWrite(ProtonBuffer, Runnable)Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.qpid.protonj2.engine.EngineHandlerengineStarting, handleEngineStateChanged, handleRead, handleRead, handlerRemoved, handleWrite, handleWrite, handleWriteMethods inherited from interface org.apache.qpid.protonj2.types.security.SaslPerformative.SaslPerformativeHandlerhandleChallenge, handleInit, handleMechanisms, handleResponse
- 
Field Details- 
AMQP_FRAME_TYPEpublic static final byte AMQP_FRAME_TYPEFrame type indicator for AMQP protocol frames.- See Also:
 
- 
SASL_FRAME_TYPEpublic static final byte SASL_FRAME_TYPEFrame type indicator for SASL protocol frames.- See Also:
 
- 
FRAME_SIZE_BYTESpublic static final int FRAME_SIZE_BYTESThe specified encoding size for the frame size value of each encoded frame.- See Also:
 
 
- 
- 
Constructor Details- 
ProtonFrameDecodingHandlerpublic ProtonFrameDecodingHandler()
 
- 
- 
Method Details- 
handlerAddedDescription copied from interface:EngineHandlerCalled when the handler is successfully added to theEnginePipelineand will later be initialized before use.- Specified by:
- handlerAddedin interface- EngineHandler
- Parameters:
- context- The context that is assigned to this handler.
 
- 
engineFailedDescription copied from interface:EngineHandlerCalled when the engine has transitioned to a failed state and cannot process any additional input or output. The handler can free and resources used for normal operations at this point as the engine is now considered shutdown.- Specified by:
- engineFailedin interface- EngineHandler
- Parameters:
- context- The context for this handler which can be used to forward the event to the next handler
- failure- The failure that triggered the engine to cease operations.
 
- 
handleReadDescription copied from interface:EngineHandlerHandle the read of new incoming bytes from a remote sender. The handler should generally decode these bytes into an AMQP Performative or SASL Performative based on the current state of the connection and the handler in question.- Specified by:
- handleReadin interface- EngineHandler
- Parameters:
- context- The context for this handler which can be used to forward the event to the next handler
- buffer- The buffer containing the bytes that the engine handler should decode.
 
- 
handleReadDescription copied from interface:EngineHandlerHandle the receipt of an incoming SASL performative based on the current state of this handler.- Specified by:
- handleReadin interface- EngineHandler
- Parameters:
- context- The context for this handler which can be used to forward the event to the next handler
- envelope- The SASL envelope that wraps the received- SaslPerformative.
 
- 
handleWriteDescription copied from interface:EngineHandlerHandles write of SaslPerformative either by directly writing it to the output target or by converting it to bytes and firing a write using theProtonBufferbased API inEngineHandlerContext.fireWrite(ProtonBuffer, Runnable)- Specified by:
- handleWritein interface- EngineHandler
- Parameters:
- context- The- EngineHandlerContextassociated with this- EngineHandlerinstance.
- envelope- The- SASLEnvelopeinstance to write.
 
- 
handleOutcome- Specified by:
- handleOutcomein interface- SaslPerformative.SaslPerformativeHandler<EngineHandlerContext>
 
 
-