Class EncoderSink

java.lang.Object
org.eclipse.jetty.compression.EncoderSink
All Implemented Interfaces:
org.eclipse.jetty.io.Content.Sink

public abstract class EncoderSink extends Object implements org.eclipse.jetty.io.Content.Sink
  • Constructor Details

    • EncoderSink

      protected EncoderSink(org.eclipse.jetty.io.Content.Sink sink)
  • Method Details

    • write

      public void write(boolean last, ByteBuffer content, org.eclipse.jetty.util.Callback callback)
      Specified by:
      write in interface org.eclipse.jetty.io.Content.Sink
    • encode

      protected abstract EncoderSink.WriteRecord encode(boolean last, ByteBuffer content)
      Creates a EncoderSink.WriteRecord with the given last flag and content buffer.
      Parameters:
      last - the last flag to eventually pass to Content.Sink.write(boolean, ByteBuffer, Callback).
      content - the buffer to eventually pass to Content.Sink.write(boolean, ByteBuffer, Callback).
      Returns:
      the EncoderSink.WriteRecord.
      Throws:
      IllegalStateException - if release() has already been called.
    • release

      protected void release()

      Release all resources held by this instance. Any further write attempt fails once this method has been called.

      Implementation must be idempotent.