QueryHandler¶
-
public interface
QueryHandler
¶ A callback interface to be implemented for handling of queries on storages or evals. See
Session.declareStorage(String,StorageHandler)
andSession.declareEval(String,QueryHandler)
.
Methods¶
handleQuery¶
-
public void
handleQuery
(String rname, String predicate, RepliesSender repliesSender)¶ The method that will be called on reception of query matching the stored/evaluated resource selection. The implementation must provide the data matching the resource rname by calling the
RepliesSender.sendReplies(Resource[])
method with the data as argument. TheRepliesSender.sendReplies(Resource[])
method MUST be called but accepts empty data array. This call can be made in the current Thread or in a different Thread.Parameters: - rname – the resource name of the queried data.
- predicate – a string provided by the querier refining the data to be provided.
- repliesSender – a
RepliesSender
on which the sendReplies() function MUST be called with the provided data as argument.