Class ProtonFrameEncodingHandler
- java.lang.Object
-
- org.apache.qpid.protonj2.engine.impl.ProtonFrameEncodingHandler
-
- All Implemented Interfaces:
EngineHandler
public class ProtonFrameEncodingHandler extends java.lang.Object implements EngineHandler
Handler that encodes performatives into properly formed frames for IO
-
-
Field Summary
Fields Modifier and Type Field Description static byte
AMQP_FRAME_TYPE
Frame type indicator for AMQP protocol frames.static byte
SASL_FRAME_TYPE
Frame type indicator for SASL protocol frames.
-
Constructor Summary
Constructors Constructor Description ProtonFrameEncodingHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handlerAdded(EngineHandlerContext context)
Called when the handler is successfully added to theEnginePipeline
and will later be initialized before use.void
handleWrite(EngineHandlerContext context, HeaderEnvelope envelope)
Handles write of AMQPHeader either by directly writing it to the output target or by converting it to bytes and firing a write using theProtonBuffer
based API inEngineHandlerContext.fireWrite(ProtonBuffer, Runnable)
void
handleWrite(EngineHandlerContext context, OutgoingAMQPEnvelope envelope)
Handles write of AMQP performative envelope either by directly writing it to the output target or by converting it to bytes and firing a write using theProtonBuffer
based API inEngineHandlerContext.fireWrite(ProtonBuffer, Runnable)
void
handleWrite(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 theProtonBuffer
based API inEngineHandlerContext.fireWrite(ProtonBuffer, Runnable)
-
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
engineFailed, engineStarting, handleEngineStateChanged, handleRead, handleRead, handleRead, handleRead, handlerRemoved, handleWrite
-
-
-
-
Field Detail
-
AMQP_FRAME_TYPE
public static final byte AMQP_FRAME_TYPE
Frame type indicator for AMQP protocol frames.- See Also:
- Constant Field Values
-
SASL_FRAME_TYPE
public static final byte SASL_FRAME_TYPE
Frame type indicator for SASL protocol frames.- See Also:
- Constant Field Values
-
-
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.
-
handleWrite
public void handleWrite(EngineHandlerContext context, HeaderEnvelope envelope)
Description copied from interface:EngineHandler
Handles write of AMQPHeader either by directly writing it to the output target or by converting it to bytes and firing a write using theProtonBuffer
based API inEngineHandlerContext.fireWrite(ProtonBuffer, Runnable)
- Specified by:
handleWrite
in interfaceEngineHandler
- Parameters:
context
- TheEngineHandlerContext
associated with thisEngineHandler
instance.envelope
- TheHeaderEnvelope
instance to write.
-
handleWrite
public void handleWrite(EngineHandlerContext context, SASLEnvelope envelope)
Description copied from interface:EngineHandler
Handles write of SaslPerformative either by directly writing it to the output target or by converting it to bytes and firing a write using theProtonBuffer
based API inEngineHandlerContext.fireWrite(ProtonBuffer, Runnable)
- Specified by:
handleWrite
in interfaceEngineHandler
- Parameters:
context
- TheEngineHandlerContext
associated with thisEngineHandler
instance.envelope
- TheSASLEnvelope
instance to write.
-
handleWrite
public void handleWrite(EngineHandlerContext context, OutgoingAMQPEnvelope envelope)
Description copied from interface:EngineHandler
Handles write of AMQP performative envelope either by directly writing it to the output target or by converting it to bytes and firing a write using theProtonBuffer
based API inEngineHandlerContext.fireWrite(ProtonBuffer, Runnable)
- Specified by:
handleWrite
in interfaceEngineHandler
- Parameters:
context
- TheEngineHandlerContext
associated with thisEngineHandler
instance.envelope
- TheOutgoingAMQPEnvelope
instance to write.
-
-