Package org.apache.http.nio.reactor
Interface SessionRequestCallback
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 TypeMethodDescriptionvoidcancelled(SessionRequest request) Triggered on cancellation of aSessionRequest.voidcompleted(SessionRequest request) Triggered on successful completion of aSessionRequest.voidfailed(SessionRequest request) Triggered on unsuccessful completion aSessionRequest.voidtimeout(SessionRequest request) Triggered if aSessionRequesttimes 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 aSessionRequesttimes out.- Parameters:
request- session request.
-
cancelled
Triggered on cancellation of aSessionRequest.- Parameters:
request- session request.
-