Package org.eclipse.jetty.io
Interface WriteFlusher.Listener
-
- All Known Implementing Classes:
HTTP2Connection,HTTP2ServerConnection,HTTP2ServerConnection.ServerHttpChannelOverHTTP2,HttpChannelOverHTTP2,HttpConnection
- Enclosing class:
- WriteFlusher
public static interface WriteFlusher.ListenerA listener of
WriteFlusherevents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonFlushed(long bytes)Invoked when aWriteFlusherflushed bytes in a non-blocking way, as part of a - possibly larger - write.
-
-
-
Method Detail
-
onFlushed
void onFlushed(long bytes) throws java.io.IOExceptionInvoked when a
WriteFlusherflushed bytes in a non-blocking way, as part of a - possibly larger - write.This method may be invoked multiple times, for example when writing a large buffer: a first flush of bytes, then the connection became TCP congested, and a subsequent flush of bytes when the connection became writable again.
This method is never invoked concurrently, but may be invoked by different threads, so implementations may not rely on thread-local variables.
Implementations may throw an
IOExceptionto signal that the write should fail, for example if the implementation enforces a minimum data rate.- Parameters:
bytes- the number of bytes flushed- Throws:
java.io.IOException- if the write should fail
-
-