Class FragmentExtension.FragmentingDemandingFlusher
java.lang.Object
org.eclipse.jetty.util.IteratingCallback
org.eclipse.jetty.websocket.core.util.DemandingFlusher
org.eclipse.jetty.websocket.core.internal.FragmentExtension.FragmentingDemandingFlusher
- All Implemented Interfaces:
Callback
,Invocable
,DemandChain
- Enclosing class:
- FragmentExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.IteratingCallback
IteratingCallback.Action
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Callback
Callback.Completable, Callback.Completing, Callback.Nested
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task
-
Field Summary
Fields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking
-
Constructor Summary
-
Method Summary
Methods inherited from class org.eclipse.jetty.websocket.core.util.DemandingFlusher
closeFlusher, demand, emitFrame, failFlusher, onCompleteFailure, onFrame, process, setNextDemand
Methods inherited from class org.eclipse.jetty.util.IteratingCallback
abort, close, failed, isAborted, isClosed, isFailed, isSucceeded, iterate, onCompleteSuccess, onSuccess, reset, succeeded, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.Callback
completeWith
Methods inherited from interface org.eclipse.jetty.util.thread.Invocable
getInvocationType
-
Constructor Details
-
FragmentingDemandingFlusher
public FragmentingDemandingFlusher()
-
-
Method Details
-
handle
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 classDemandingFlusher
- Parameters:
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.- Returns:
- false to continue processing this frame, true to complete processing and get a new frame.
-