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 singleQueryHandler
instance will be created for eachNetwork
instance 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.ProposalResponse
evaluate(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.
-
-