Interface QueryHandler

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 QueryHandler
Handler responsible for evaluating a given query against appropriate peers. A single QueryHandler instance will be created for each Network instance so the query handler may maintain instance state across multiple queries.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.hyperledger.fabric.sdk.ProposalResponse
    evaluate(Query query)
    Called when the result for a given query is required.
  • Method Details

    • evaluate

      org.hyperledger.fabric.sdk.ProposalResponse evaluate(Query query) throws ContractException
      Called when the result for a given query is required.
      Parameters:
      query - The query to evaluate.
      Returns:
      The query result.
      Throws:
      ContractException - if no peers are reachable or an error response is returned.