Class ProtonPerformativeHandler
java.lang.Object
org.apache.qpid.protonj2.engine.impl.ProtonPerformativeHandler
- All Implemented Interfaces:
EngineHandler
,AMQPHeader.HeaderHandler<EngineHandlerContext>
,Performative.PerformativeHandler<EngineHandlerContext>
public class ProtonPerformativeHandler
extends Object
implements EngineHandler, AMQPHeader.HeaderHandler<EngineHandlerContext>, Performative.PerformativeHandler<EngineHandlerContext>
Transport Handler that forwards the incoming Performatives to the associated Connection
as well as any error encountered during the Transport processing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
engineFailed
(EngineHandlerContext context, EngineFailedException failure) Called when the engine has transitioned to a failed state and cannot process any additional input or output.void
handleAMQPHeader
(AMQPHeader header, EngineHandlerContext context) void
handleAttach
(Attach attach, ProtonBuffer payload, int channel, EngineHandlerContext context) void
handleBegin
(Begin begin, ProtonBuffer payload, int channel, EngineHandlerContext context) void
handleClose
(Close close, ProtonBuffer payload, int channel, EngineHandlerContext context) void
handleDetach
(Detach detach, ProtonBuffer payload, int channel, EngineHandlerContext context) void
handleDisposition
(Disposition disposition, ProtonBuffer payload, int channel, EngineHandlerContext context) void
handleEnd
(End end, ProtonBuffer payload, int channel, EngineHandlerContext context) void
handleFlow
(Flow flow, ProtonBuffer payload, int channel, EngineHandlerContext context) void
handleOpen
(Open open, ProtonBuffer payload, int channel, EngineHandlerContext context) void
handlerAdded
(EngineHandlerContext context) Called when the handler is successfully added to theEnginePipeline
and will later be initialized before use.void
handleRead
(EngineHandlerContext context, HeaderEnvelope header) Handle the receipt of an incoming AMQP Header or SASL Header based on the current state of this handler.void
handleRead
(EngineHandlerContext context, IncomingAMQPEnvelope envelope) Handle the receipt of an incoming AMQP envelope based on the current state of this handler.void
handleSASLHeader
(AMQPHeader header, EngineHandlerContext context) void
handleTransfer
(Transfer transfer, ProtonBuffer payload, int channel, EngineHandlerContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.qpid.protonj2.engine.EngineHandler
engineStarting, handleEngineStateChanged, handleRead, handleRead, handlerRemoved, handleWrite, handleWrite, handleWrite, handleWrite
-
Constructor Details
-
ProtonPerformativeHandler
public ProtonPerformativeHandler()
-
-
Method Details
-
handlerAdded
Description copied from interface:EngineHandler
Called when the handler is successfully added to theEnginePipeline
and will later be initialized before use.- Specified by:
handlerAdded
in interfaceEngineHandler
- Parameters:
context
- The context that is assigned to this handler.
-
handleRead
Description copied from interface:EngineHandler
Handle the receipt of an incoming AMQP Header or SASL Header based on the current state of this handler.- Specified by:
handleRead
in interfaceEngineHandler
- Parameters:
context
- The context for this handler which can be used to forward the event to the next handlerheader
- The AMQP Header envelope that wraps the received header instance.
-
handleRead
Description copied from interface:EngineHandler
Handle the receipt of an incoming AMQP envelope based on the current state of this handler.- Specified by:
handleRead
in interfaceEngineHandler
- Parameters:
context
- The context for this handler which can be used to forward the event to the next handlerenvelope
- The AMQP envelope that wraps the receivedPerformative
.
-
engineFailed
Description copied from interface:EngineHandler
Called 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:
engineFailed
in interfaceEngineHandler
- Parameters:
context
- The context for this handler which can be used to forward the event to the next handlerfailure
- The failure that triggered the engine to cease operations.
-
handleAMQPHeader
- Specified by:
handleAMQPHeader
in interfaceAMQPHeader.HeaderHandler<EngineHandlerContext>
-
handleSASLHeader
- Specified by:
handleSASLHeader
in interfaceAMQPHeader.HeaderHandler<EngineHandlerContext>
-
handleOpen
- Specified by:
handleOpen
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-
handleBegin
public void handleBegin(Begin begin, ProtonBuffer payload, int channel, EngineHandlerContext context) - Specified by:
handleBegin
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-
handleAttach
public void handleAttach(Attach attach, ProtonBuffer payload, int channel, EngineHandlerContext context) - Specified by:
handleAttach
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-
handleFlow
- Specified by:
handleFlow
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-
handleTransfer
public void handleTransfer(Transfer transfer, ProtonBuffer payload, int channel, EngineHandlerContext context) - Specified by:
handleTransfer
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-
handleDisposition
public void handleDisposition(Disposition disposition, ProtonBuffer payload, int channel, EngineHandlerContext context) - Specified by:
handleDisposition
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-
handleDetach
public void handleDetach(Detach detach, ProtonBuffer payload, int channel, EngineHandlerContext context) - Specified by:
handleDetach
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-
handleEnd
- Specified by:
handleEnd
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-
handleClose
public void handleClose(Close close, ProtonBuffer payload, int channel, EngineHandlerContext context) - Specified by:
handleClose
in interfacePerformative.PerformativeHandler<EngineHandlerContext>
-