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
-
Nested Class Summary
Nested classes/interfaces inherited from interface Callback
Callback.Completable, Callback.Completing, Callback.NestedNested classes/interfaces inherited from interface Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.TaskNested classes/interfaces inherited from interface Response
Response.Wrapper -
Field Summary
Fields inherited from interface Invocable
__nonBlocking, NOOP -
Constructor Summary
ConstructorsConstructorDescriptionGzipResponseAndCallback(GzipHandler handler, Request request, Response response, Callback callback) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcommit(boolean last, Callback callback, ByteBuffer content) voidCallback invoked when the operation fails.voidvoidCallback invoked when the operation completes.voidwrite(boolean last, ByteBuffer content, Callback callback) Writes the givenByteBuffer, notifying theCallbackwhen the write is complete.Methods inherited from class Response.Wrapper
getHeaders, getRequest, getStatus, getTrailersSupplier, getWrapped, hasLastWrite, isCommitted, isCompletedSuccessfully, reset, setStatus, setTrailersSupplier, writeInterimMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Callback
completeWith
-
Constructor Details
-
GzipResponseAndCallback
public GzipResponseAndCallback(GzipHandler handler, Request request, Response response, Callback callback)
-
-
Method Details
-
succeeded
-
failed
-
getInvocationType
- Specified by:
getInvocationTypein interfaceInvocable- Returns:
- The InvocationType of this object
-
write
Description copied from interface:ResponseWrites the given
ByteBuffer, notifying theCallbackwhen 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
Callbackand a call to this method.The invocation of the passed
Callbackis 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
Callbackshould not block waiting for a callback of a future call to this method.- Specified by:
writein interfaceContent.Sink- Specified by:
writein interfaceResponse- Overrides:
writein classResponse.Wrapper- Parameters:
last- whether the ByteBuffer is the last to writecontent- the ByteBuffer to writecallback- the callback to notify when the write operation is complete
-
commit
-
noCompression
public void noCompression()
-