Interface ClientHandlerCallback<RESP extends MessageBody>


@Internal public interface ClientHandlerCallback<RESP extends MessageBody>
Callback for ClientHandler.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called on any failure, which is not related to a specific request.
    void
    onRequestFailure(long requestId, Throwable cause)
    Called on a failed request.
    void
    onRequestResult(long requestId, RESP response)
    Called on a successful request.
  • Method Details

    • onRequestResult

      void onRequestResult(long requestId, RESP response)
      Called on a successful request.
      Parameters:
      requestId - ID of the request
      response - The received response
    • onRequestFailure

      void onRequestFailure(long requestId, Throwable cause)
      Called on a failed request.
      Parameters:
      requestId - ID of the request
      cause - Cause of the request failure
    • onFailure

      void onFailure(Throwable cause)
      Called on any failure, which is not related to a specific request.

      This can be for example a caught Exception in the channel pipeline or an unexpected channel close.

      Parameters:
      cause - Cause of the failure