Package org.eclipse.jetty.client.api
Interface Request.Listener
- All Superinterfaces:
EventListener
,Request.BeginListener
,Request.CommitListener
,Request.ContentListener
,Request.FailureListener
,Request.HeadersListener
,Request.QueuedListener
,Request.RequestListener
,Request.SuccessListener
- All Known Implementing Classes:
Request.Listener.Adapter
- Enclosing interface:
- Request
public static interface Request.Listener
extends Request.QueuedListener, Request.BeginListener, Request.HeadersListener, Request.CommitListener, Request.ContentListener, Request.SuccessListener, Request.FailureListener
Listener for all request events.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Callback method invoked when the request begins being processed in order to be sent.default void
Callback method invoked when the request headers (and perhaps small content) have been sent.default void
onContent
(Request request, ByteBuffer content) Callback method invoked when a chunk of request content has been sent successfully.default void
Callback method invoked when the request has failed to be sentdefault void
Callback method invoked when the request headers (and perhaps small content) are ready to be sent.default void
Callback method invoked when the request is queued, waiting to be sentdefault void
Callback method invoked when the request has been successfully sent.
-
Method Details
-
onQueued
Description copied from interface:Request.QueuedListener
Callback method invoked when the request is queued, waiting to be sent- Specified by:
onQueued
in interfaceRequest.QueuedListener
- Parameters:
request
- the request being queued
-
onBegin
Description copied from interface:Request.BeginListener
Callback method invoked when the request begins being processed in order to be sent. This is the last opportunity to modify the request.- Specified by:
onBegin
in interfaceRequest.BeginListener
- Parameters:
request
- the request that begins being processed
-
onHeaders
Description copied from interface:Request.HeadersListener
Callback method invoked when the request headers (and perhaps small content) are ready to be sent. The request has been converted into bytes, but not yet sent to the server, and further modifications to the request may have no effect.- Specified by:
onHeaders
in interfaceRequest.HeadersListener
- Parameters:
request
- the request that is about to be committed
-
onCommit
Description copied from interface:Request.CommitListener
Callback method invoked when the request headers (and perhaps small content) have been sent. The request is now committed, and in transit to the server, and further modifications to the request may have no effect.- Specified by:
onCommit
in interfaceRequest.CommitListener
- Parameters:
request
- the request that has been committed
-
onContent
Description copied from interface:Request.ContentListener
Callback method invoked when a chunk of request content has been sent successfully. Changes to bytes in the given buffer have no effect, as the content has already been sent.- Specified by:
onContent
in interfaceRequest.ContentListener
- Parameters:
request
- the request that has been committedcontent
- the content
-
onSuccess
Description copied from interface:Request.SuccessListener
Callback method invoked when the request has been successfully sent.- Specified by:
onSuccess
in interfaceRequest.SuccessListener
- Parameters:
request
- the request sent
-
onFailure
Description copied from interface:Request.FailureListener
Callback method invoked when the request has failed to be sent- Specified by:
onFailure
in interfaceRequest.FailureListener
- Parameters:
request
- the request that failedfailure
- the failure
-