Class WebSocketFlusher
java.lang.Object
org.eclipse.jetty.websocket.core.util.WebSocketFlusher
- All Implemented Interfaces:
 OutgoingFrames
- Direct Known Subclasses:
 FragmentingFlusher
This is used to iteratively transform or process a frame into one or more other frames.
When a frame is ready to be processed 
onFrame(OutgoingEntry, boolean) is called.
Subsequent calls to onFrame(OutgoingEntry, boolean) are after each time the entry is succeeded
until one of these calls returns true to indicate they are done processing the frame and are ready to receive a new one.- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidUsed to close this flusher when there is no explicit failure.voidUsed to fail this flusher possibly from an external event such as a callback.protected voidonCompleteFailure(Throwable cause) Called when the flusher has failed andonFrame(OutgoingEntry, boolean)will never be called again.protected abstract booleanonFrame(OutgoingEntry entry, boolean first) Called when a frame is ready to be transformed.final voidsendFrame(OutgoingEntry entry) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OutgoingFrames
sendFrame 
- 
Constructor Details
- 
WebSocketFlusher
public WebSocketFlusher() 
 - 
 - 
Method Details
- 
onFrame
Called when a frame is ready to be transformed.- Parameters:
 entry- the entry containing the frame to be transformed.first- true if this is the first time this entry is being processed.- Returns:
 - true to indicate that you have finished transforming this entry.
 
 - 
onCompleteFailure
Called when the flusher has failed andonFrame(OutgoingEntry, boolean)will never be called again. - 
sendFrame
Description copied from interface:OutgoingFrames- Specified by:
 sendFramein interfaceOutgoingFrames- Parameters:
 entry- the frame to eventually write to the network layer.
 - 
closeFlusher
public void closeFlusher()Used to close this flusher when there is no explicit failure. - 
failFlusher
Used to fail this flusher possibly from an external event such as a callback.- Parameters:
 t- the failure.
 
 -