org.hyperledger.fabric.gateway.spi

## 接口 QueryHandler

- 函数接口:
    这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

      @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.

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `org.hyperledger.fabric.sdk.ProposalResponse` | `evaluate(Query query)` Called when the result for a given query is required.

- - ### 方法详细资料

    - #### evaluate

          org.hyperledger.fabric.sdk.ProposalResponse evaluate(Query query)
                                                        throws ContractException

      Called when the result for a given query is required.
      参数:
        `query` - The query to evaluate.
      返回:
        The query result.
      抛出:
        `ContractException` - if no peers are reachable or an error response is returned.

Copyright © 2023. All rights reserved.