Interface NodeApiClient.ResponseConsumer

Enclosing class:
NodeApiClient

public static interface NodeApiClient.ResponseConsumer
The interface provides a single method to process a ResponseBody, allowing custom handling of API responses received from a node.

Implementations of this interface should define specific behavior for parsing, validating, or otherwise processing the ResponseBody.

If an error occurs during response processing, the method can throw a MoeraNodeException.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(okhttp3.ResponseBody responseBody)
    Processes the provided ResponseBody.
  • Method Details

    • accept

      void accept(okhttp3.ResponseBody responseBody) throws MoeraNodeException
      Processes the provided ResponseBody. This method is intended to handle custom logic for parsing, validating, or processing the response received from a node.
      Parameters:
      responseBody - the response body to be processed
      Throws:
      MoeraNodeException - if an error occurs when processing the response