Package org.moera.lib.node
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 TypeMethodDescriptionvoid
accept
(okhttp3.ResponseBody responseBody) Processes the providedResponseBody
.
-
Method Details
-
accept
Processes the providedResponseBody
. 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
-