Package org.eclipse.jetty.client
Class TimeoutCompleteListener
java.lang.Object
org.eclipse.jetty.io.CyclicTimeout
org.eclipse.jetty.client.TimeoutCompleteListener
- All Implemented Interfaces:
EventListener
,Response.CompleteListener
,Response.ResponseListener
,Destroyable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Logger
private final AtomicReference
<Request> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onComplete
(Result result) Callback method invoked when the request and the response have been processed, either successfully or not.void
Invoked when the timeout expires.(package private) void
schedule
(HttpRequest request, long timeoutAt) Methods inherited from class org.eclipse.jetty.io.CyclicTimeout
cancel, destroy, getScheduler, schedule
-
Field Details
-
LOG
-
request
-
-
Constructor Details
-
TimeoutCompleteListener
-
-
Method Details
-
onTimeoutExpired
public void onTimeoutExpired()Description copied from class:CyclicTimeout
Invoked when the timeout expires.
- Specified by:
onTimeoutExpired
in classCyclicTimeout
-
onComplete
Description copied from interface:Response.CompleteListener
Callback method invoked when the request and the response have been processed, either successfully or not.The
result
parameter contains the request, the response, and eventual failures.Requests may complete after response, for example in case of big uploads that are discarded or read asynchronously by the server. This method is always invoked after
Response.SuccessListener.onSuccess(Response)
orResponse.FailureListener.onFailure(Response, Throwable)
, and only when request indicates that it is completed.- Specified by:
onComplete
in interfaceResponse.CompleteListener
- Parameters:
result
- the result of the request / response exchange
-
schedule
-