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 java.lang.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
Constructors Constructor Description ProtonPerformativeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
-
-
-
-
Method Detail
-
handlerAdded
public void handlerAdded(EngineHandlerContext context)
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
public void handleRead(EngineHandlerContext context, HeaderEnvelope header)
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
public void handleRead(EngineHandlerContext context, IncomingAMQPEnvelope envelope)
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
public void engineFailed(EngineHandlerContext context, EngineFailedException failure)
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
public void handleAMQPHeader(AMQPHeader header, EngineHandlerContext context)
- Specified by:
handleAMQPHeader
in interfaceAMQPHeader.HeaderHandler<EngineHandlerContext>
-
handleSASLHeader
public void handleSASLHeader(AMQPHeader header, EngineHandlerContext context)
- Specified by:
handleSASLHeader
in interfaceAMQPHeader.HeaderHandler<EngineHandlerContext>
-
handleOpen
public void handleOpen(Open open, ProtonBuffer payload, int channel, EngineHandlerContext context)
- 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
public void handleFlow(Flow flow, ProtonBuffer payload, int channel, EngineHandlerContext context)
- 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
public void handleEnd(End end, ProtonBuffer payload, int channel, EngineHandlerContext context)
- 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>
-
-