Package org.apache.http.nio.reactor
Interface SessionRequestCallback
- All Known Implementing Classes:
AbstractNIOConnPool.InternalSessionRequestCallback
public interface SessionRequestCallback
SessionRequestCallback interface can be used to get notifications of
completion of session requests asynchronously without having to wait
for it, blocking the current thread of execution.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelled
(SessionRequest request) Triggered on cancellation of aSessionRequest
.void
completed
(SessionRequest request) Triggered on successful completion of aSessionRequest
.void
failed
(SessionRequest request) Triggered on unsuccessful completion aSessionRequest
.void
timeout
(SessionRequest request) Triggered if aSessionRequest
times out.
-
Method Details
-
completed
Triggered on successful completion of aSessionRequest
. TheSessionRequest.getSession()
method can now be used to obtain the new I/O session.- Parameters:
request
- session request.
-
failed
Triggered on unsuccessful completion aSessionRequest
. TheSessionRequest.getException()
method can now be used to obtain the cause of the error.- Parameters:
request
- session request.
-
timeout
Triggered if aSessionRequest
times out.- Parameters:
request
- session request.
-
cancelled
Triggered on cancellation of aSessionRequest
.- Parameters:
request
- session request.
-