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 a Request operation.
    See Also:
    Request.submit(RequestCallback)
    • 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 and reply parameter will be null. If operation completes successfully then err parameter will be null and reply parameter will hold the reply message.

        Parameters:
        err - Error (null if operation was successful).
        rsp - Response (null if operation failed).