Class GzipResponseAndCallback

java.lang.Object
org.eclipse.jetty.server.Response.Wrapper
org.eclipse.jetty.server.handler.gzip.GzipResponseAndCallback
All Implemented Interfaces:
Content.Sink, Response, Callback, Invocable

public class GzipResponseAndCallback extends Response.Wrapper implements Callback, Invocable
  • Constructor Details

  • Method Details

    • succeeded

      public void succeeded()
      Description copied from interface: Callback

      Callback invoked when the operation completes.

      Specified by:
      succeeded in interface Callback
      See Also:
    • failed

      public void failed(Throwable x)
      Description copied from interface: Callback

      Callback invoked when the operation fails.

      Specified by:
      failed in interface Callback
      Parameters:
      x - the reason for the operation failure
    • getInvocationType

      public Invocable.InvocationType getInvocationType()
      Specified by:
      getInvocationType in interface Invocable
      Returns:
      The InvocationType of this object
    • write

      public void write(boolean last, ByteBuffer content, Callback callback)
      Description copied from interface: Response

      Writes the given ByteBuffer, notifying the Callback when the write is complete.

      Implementations guarantee that calls to this method are safely reentrant so that stack overflows are avoided in the case of mutual recursion between the execution of the Callback and a call to this method.

      The invocation of the passed Callback is serialized with previous calls of this method, so that it is not invoked until any invocation of the callback of a previous call to this method has returned.

      Thus a Callback should not block waiting for a callback of a future call to this method.

      Specified by:
      write in interface Content.Sink
      Specified by:
      write in interface Response
      Overrides:
      write in class Response.Wrapper
      Parameters:
      last - whether the ByteBuffer is the last to write
      content - the ByteBuffer to write
      callback - the callback to notify when the write operation is complete
    • commit

      protected void commit(boolean last, Callback callback, ByteBuffer content)
    • noCompression

      public void noCompression()