Package io.aeron

Class ImageControlledFragmentAssembler

java.lang.Object
io.aeron.ImageControlledFragmentAssembler
All Implemented Interfaces:
ControlledFragmentHandler

public class ImageControlledFragmentAssembler extends Object implements ControlledFragmentHandler
A ControlledFragmentHandler that sits in a chain-of-responsibility pattern that reassembles fragmented messages so that the next handler in the chain only sees whole messages. This is for a single session on an Image and not for multiple session Images in a Subscription.

Unfragmented messages are delegated without copy. Fragmented messages are copied to a temporary buffer for reassembly before delegation.

The Header passed to the delegate on assembling a message will be that of the last fragment.

See Also:
  • Constructor Details

    • ImageControlledFragmentAssembler

      public ImageControlledFragmentAssembler(ControlledFragmentHandler delegate)
      Construct an adapter to reassemble message fragments and delegate on whole messages.
      Parameters:
      delegate - onto which whole messages are forwarded.
    • ImageControlledFragmentAssembler

      public ImageControlledFragmentAssembler(ControlledFragmentHandler delegate, int initialBufferLength)
      Construct an adapter to reassemble message fragments and delegate on whole messages.
      Parameters:
      delegate - onto which whole messages are forwarded.
      initialBufferLength - to be used for the session.
    • ImageControlledFragmentAssembler

      public ImageControlledFragmentAssembler(ControlledFragmentHandler delegate, int initialBufferLength, boolean isDirectByteBuffer)
      Construct an adapter to reassemble message fragments and delegate on whole messages.
      Parameters:
      delegate - onto which whole messages are forwarded.
      initialBufferLength - to be used for the session.
      isDirectByteBuffer - is the underlying buffer to be a direct ByteBuffer?
  • Method Details