Class FragmentExtension.FragmentingDemandingFlusher

All Implemented Interfaces:
Callback, Invocable, DemandChain
Enclosing class:

public class FragmentExtension.FragmentingDemandingFlusher extends DemandingFlusher
  • Constructor Details

    • FragmentingDemandingFlusher

      public FragmentingDemandingFlusher()
  • Method Details

    • handle

      protected boolean handle(Frame frame, Callback callback, boolean first)
      Description copied from class: DemandingFlusher

      Called when there is demand for a single frame to be produced. During this method a single call can be made to DemandingFlusher.emitFrame(Frame, Callback) which will forward this frame towards the application. Returning true from this method signals that you are done processing the current Frame, and the next invocation of this method will have the next frame.

      Note that the callback supplied here is specially wrapped so that you can call it multiple times and it will not be completed more than once. This simplifies the handling of failure cases.

      Specified by:
      handle in class DemandingFlusher
      frame - the original frame.
      callback - to succeed to release the frame payload.
      first - if this is the first time this method has been called for this frame.
      false to continue processing this frame, true to complete processing and get a new frame.