Interface WriteFlusher.Listener

Enclosing class:
WriteFlusher

@Deprecated(since="12.0.10", forRemoval=true) public static interface WriteFlusher.Listener
Deprecated, for removal: This API element is subject to removal in a future version.
functionality removed, no replacement

A listener of WriteFlusher events. If implemented by a Connection class, the onFlushed(long) event will be delivered to it.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onFlushed(long bytes)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Invoked when a WriteFlusher flushed bytes in a non-blocking way, as part of a - possibly larger - write.
  • Method Details

    • onFlushed

      void onFlushed(long bytes) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.

      Invoked when a WriteFlusher flushed 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 IOException to signal that the write should fail, for example if the implementation enforces a minimum data rate.

      Parameters:
      bytes - the number of bytes flushed
      Throws:
      IOException - if the write should fail