Package org.apache.qpid.protonj2.engine
Class OutgoingAMQPEnvelope
java.lang.Object
org.apache.qpid.protonj2.engine.PerformativeEnvelope<Performative>
org.apache.qpid.protonj2.engine.OutgoingAMQPEnvelope
Frame object that carries an AMQP Performative
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final byteThe frame type value to used when encoding the outgoing AMQP frame.
- 
Method SummaryModifier and TypeMethodDescriptionCalled by the encoder when the write of a frame that comprises the transfer of the AMQPPerformativeplus any assigned payload has completed.Called when the encoder determines that the encoding of thePerformativeplus any payload value is to large for a single AMQP frame.<E> voidinvoke(Performative.PerformativeHandler<E> handler, E context) Invoke the correct PerformativeHandler event based on the body of thisOutgoingAMQPEnvelopefinal voidrelease()Used to release a Frame that was taken from a Frame pool in order to make it available for the next input operations.setFrameWriteCompletionHandler(Runnable frameWriteCompleteHandler) Configures a handler to be invoked when a write operation that was handed off to the I/O layer has completed indicated that a single frame portion of the payload has been fully written.setPayloadToLargeHandler(Consumer<Performative> payloadToLargeHandler) Configures a handler to be invoked if the payload that is being transmitted with this performative is to large to allow encoding the frame within the maximum configured AMQP frame size limit.Methods inherited from class org.apache.qpid.protonj2.engine.PerformativeEnvelopegetBody, getChannel, getFrameType, getPayload, toString
- 
Field Details- 
AMQP_FRAME_TYPEpublic static final byte AMQP_FRAME_TYPEThe frame type value to used when encoding the outgoing AMQP frame.- See Also:
 
 
- 
- 
Method Details- 
setPayloadToLargeHandlerConfigures a handler to be invoked if the payload that is being transmitted with this performative is to large to allow encoding the frame within the maximum configured AMQP frame size limit.- Parameters:
- payloadToLargeHandler- Handler that will update the Performative to reflect that more than one frame is required.
- Returns:
- this OutgoingAMQPEnvelopeinstance.
 
- 
handlePayloadToLargeCalled when the encoder determines that the encoding of thePerformativeplus any payload value is to large for a single AMQP frame. The configured handler should update thePerformativein preparation for encoding as a split framed AMQP transfer.- Returns:
- this OutgoingAMQPEnvelopeinstance
 
- 
setFrameWriteCompletionHandlerConfigures a handler to be invoked when a write operation that was handed off to the I/O layer has completed indicated that a single frame portion of the payload has been fully written.- Parameters:
- frameWriteCompleteHandler- Runnable handler that will update state or otherwise respond to the write of a frame.
- Returns:
- this OutgoingAMQPEnvelopeinstance.
 
- 
handleOutgoingFrameWriteCompleteCalled by the encoder when the write of a frame that comprises the transfer of the AMQPPerformativeplus any assigned payload has completed. If the transfer comprises multiple frame writes this handler should be invoked as each frame is successfully written by the IO layer.- Returns:
- this OutgoingAMQPEnvelopeinstance.
 
- 
releasepublic final void release()Used to release a Frame that was taken from a Frame pool in order to make it available for the next input operations. Once called the contents of the Frame are invalid and cannot be used again inside the same context.
- 
invokeInvoke the correct PerformativeHandler event based on the body of thisOutgoingAMQPEnvelope- Type Parameters:
- E- The type that the- Performativehandler expects for the context value.
- Parameters:
- handler- The handler that should be used to process the current body value.
- context- The context that should be passed along for the current event.
 
 
-