Package org.eclipse.jetty.server.handler
Class StatisticsHandler.MinimumDataRateHandler.MinimumDataRateResponse
java.lang.Object
org.eclipse.jetty.server.Response.Wrapper
org.eclipse.jetty.server.handler.StatisticsHandler.MinimumDataRateHandler.MinimumDataRateResponse
- All Implemented Interfaces:
Content.Sink
,Response
- Enclosing class:
- StatisticsHandler.MinimumDataRateHandler
protected class StatisticsHandler.MinimumDataRateHandler.MinimumDataRateResponse
extends Response.Wrapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.Response
Response.Wrapper
-
Constructor Summary
ConstructorDescriptionMinimumDataRateResponse
(StatisticsHandler.MinimumDataRateHandler.MinimumDataRateRequest request, Response wrapped) -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(boolean last, ByteBuffer byteBuffer, Callback callback) Writes the givenByteBuffer
, notifying theCallback
when the write is complete.Methods inherited from class org.eclipse.jetty.server.Response.Wrapper
getHeaders, getStatus, getTrailersSupplier, getWrapped, hasLastWrite, isCommitted, isCompletedSuccessfully, reset, setStatus, setTrailersSupplier, writeInterim
-
Constructor Details
-
MinimumDataRateResponse
public MinimumDataRateResponse(StatisticsHandler.MinimumDataRateHandler.MinimumDataRateRequest request, Response wrapped)
-
-
Method Details
-
getRequest
- Specified by:
getRequest
in interfaceResponse
- Overrides:
getRequest
in classResponse.Wrapper
- Returns:
- the
Request
associated with thisResponse
-
write
Description copied from interface:Response
Writes the given
ByteBuffer
, notifying theCallback
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 interfaceContent.Sink
- Specified by:
write
in interfaceResponse
- Overrides:
write
in classResponse.Wrapper
- Parameters:
last
- whether the ByteBuffer is the last to writebyteBuffer
- the ByteBuffer to writecallback
- the callback to notify when the write operation is complete
-