Package org.eclipse.jetty.client.api
Class Request.Listener.Adapter
- java.lang.Object
-
- org.eclipse.jetty.client.api.Request.Listener.Adapter
-
- All Implemented Interfaces:
java.util.EventListener,Request.BeginListener,Request.CommitListener,Request.ContentListener,Request.FailureListener,Request.HeadersListener,Request.Listener,Request.QueuedListener,Request.RequestListener,Request.SuccessListener
- Enclosing interface:
- Request.Listener
public static class Request.Listener.Adapter extends java.lang.Object implements Request.Listener
An empty implementation ofRequest.Listener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.api.Request.Listener
Request.Listener.Adapter
-
-
Constructor Summary
Constructors Constructor Description Adapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonBegin(Request request)Callback method invoked when the request begins being processed in order to be sent.voidonCommit(Request request)Callback method invoked when the request headers (and perhaps small content) have been sent.voidonContent(Request request, java.nio.ByteBuffer content)Callback method invoked when a chunk of request content has been sent successfully.voidonFailure(Request request, java.lang.Throwable failure)Callback method invoked when the request has failed to be sentvoidonHeaders(Request request)Callback method invoked when the request headers (and perhaps small content) are ready to be sent.voidonQueued(Request request)Callback method invoked when the request is queued, waiting to be sentvoidonSuccess(Request request)Callback method invoked when the request has been successfully sent.
-
-
-
Method Detail
-
onQueued
public void onQueued(Request request)
Description copied from interface:Request.QueuedListenerCallback method invoked when the request is queued, waiting to be sent- Specified by:
onQueuedin interfaceRequest.QueuedListener- Parameters:
request- the request being queued
-
onBegin
public void onBegin(Request request)
Description copied from interface:Request.BeginListenerCallback method invoked when the request begins being processed in order to be sent. This is the last opportunity to modify the request.- Specified by:
onBeginin interfaceRequest.BeginListener- Parameters:
request- the request that begins being processed
-
onHeaders
public void onHeaders(Request request)
Description copied from interface:Request.HeadersListenerCallback 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:
onHeadersin interfaceRequest.HeadersListener- Parameters:
request- the request that is about to be committed
-
onCommit
public void onCommit(Request request)
Description copied from interface:Request.CommitListenerCallback 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:
onCommitin interfaceRequest.CommitListener- Parameters:
request- the request that has been committed
-
onContent
public void onContent(Request request, java.nio.ByteBuffer content)
Description copied from interface:Request.ContentListenerCallback 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:
onContentin interfaceRequest.ContentListener- Parameters:
request- the request that has been committedcontent- the content
-
onSuccess
public void onSuccess(Request request)
Description copied from interface:Request.SuccessListenerCallback method invoked when the request has been successfully sent.- Specified by:
onSuccessin interfaceRequest.SuccessListener- Parameters:
request- the request sent
-
onFailure
public void onFailure(Request request, java.lang.Throwable failure)
Description copied from interface:Request.FailureListenerCallback method invoked when the request has failed to be sent- Specified by:
onFailurein interfaceRequest.FailureListener- Parameters:
request- the request that failedfailure- the failure
-
-