Package io.hekate.messaging.operation
Interface RequestCallback<T>
-
- Type Parameters:
T
- Base type of request message.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RequestCallback<T>
Callback for aRequest
operation.- See Also:
Request.submit(RequestCallback)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onComplete(Throwable err, Response<T> rsp)
Called when a request operation gets completed either successfully or with an error.
-
-
-
Method Detail
-
onComplete
void onComplete(Throwable err, Response<T> rsp)
Called when a request operation gets completed either successfully or with an error.If operation completes with an error then
err
parameter will hold the error cause andreply
parameter will benull
. If operation completes successfully thenerr
parameter will benull
andreply
parameter will hold the reply message.- Parameters:
err
- Error (null
if operation was successful).rsp
- Response (null
if operation failed).
-
-