Interface ConsulResponseCallback<T>

  • Type Parameters:
    T - The Response type.

    public interface ConsulResponseCallback<T>
    For API calls that support long-polling, this callback is used to handle the result on success or failure for an async HTTP call.
    • Method Summary

      Modifier and Type Method Description
      void onComplete​(ConsulResponse<T> consulResponse)
      Callback for a successful ConsulResponse.
      void onFailure​(java.lang.Throwable throwable)
      Callback for an unsuccessful request.
    • Method Detail

      • onComplete

        void onComplete​(ConsulResponse<T> consulResponse)
        Callback for a successful ConsulResponse.
        Parameters:
        consulResponse - The Consul response.
      • onFailure

        void onFailure​(java.lang.Throwable throwable)
        Callback for an unsuccessful request.
        Parameters:
        throwable - The exception thrown.