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 QueryHandlerHandler responsible for evaluating a given query against appropriate peers. A singleQueryHandlerinstance will be created for eachNetworkinstance so the query handler may maintain instance state across multiple queries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.hyperledger.fabric.sdk.ProposalResponseevaluate(Query query)Called when the result for a given query is required.
-
-
-
Method Detail
-
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.
-
-