Class GzipResponseAndCallback

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

public class GzipResponseAndCallback extends Response.Wrapper implements org.eclipse.jetty.util.Callback, org.eclipse.jetty.util.thread.Invocable
  • Field Details

    • LOG

      public static org.slf4j.Logger LOG
    • GZIP_TRAILER_SIZE

      public static final int GZIP_TRAILER_SIZE
      See Also:
    • VARY_ACCEPT_ENCODING

      public static final org.eclipse.jetty.http.HttpField VARY_ACCEPT_ENCODING
  • Constructor Details

    • GzipResponseAndCallback

      public GzipResponseAndCallback(GzipHandler handler, Request request, Response response, org.eclipse.jetty.util.Callback callback)
  • Method Details

    • succeeded

      public void succeeded()
      Specified by:
      succeeded in interface org.eclipse.jetty.util.Callback
    • failed

      public void failed(Throwable x)
      Specified by:
      failed in interface org.eclipse.jetty.util.Callback
    • getInvocationType

      public org.eclipse.jetty.util.thread.Invocable.InvocationType getInvocationType()
      Specified by:
      getInvocationType in interface org.eclipse.jetty.util.thread.Invocable
    • write

      public void write(boolean last, ByteBuffer content, org.eclipse.jetty.util.Callback callback)
      Description copied from interface: Response

      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 org.eclipse.jetty.io.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, org.eclipse.jetty.util.Callback callback, ByteBuffer content)
    • noCompression

      public void noCompression()