Interface QueryResourceHandler
- 
- All Known Implementing Classes:
 IdentifierQueryResourceHandler
public interface QueryResourceHandlerA completion handler for consuming the results of a query request.A query result completion handler may be specified when performing query requests using a
Connectionobject. ThehandleResource(org.forgerock.json.resource.ResourceResponse)method is invoked for each resource which matches the query criteria, followed by returning aQueryResponseor aResourceExceptionindicating that no more JSON resources will be returned.Implementations of these methods should complete in a timely manner so as to avoid keeping the invoking thread from dispatching to other completion handlers.
Synchronization note: each invocation of
handleResourcefor a resource happens-before the invocation ofhandleResourcefor the next resource. Invocation ofhandleResourcefor the final resource happens-before returning aQueryResponseor aResourceExceptionare invoked with the final query status. In other words, query resource handler method invocations will occur sequentially and one at a time. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhandleResource(ResourceResponse resource)Invoked each time a matching JSON resource is returned from a query request. 
 - 
 
- 
- 
Method Detail
- 
handleResource
boolean handleResource(ResourceResponse resource)
Invoked each time a matching JSON resource is returned from a query request. More specifically, if a query request matches 10 resources, then this method will be invoked 10 times, once for each matching resource.Refer to
RequestHandler.handleQuery(org.forgerock.services.context.Context, QueryRequest, QueryResourceHandler)for information regarding the concurrency and the order in which events are processed.- Parameters:
 resource- The matching JSON resource.- Returns:
 trueif this handler should continue to be notified of any remaining matching JSON resources, orfalseif the remaining JSON resources should be skipped for some reason (e.g. a client side size limit has been reached).
 
 - 
 
 -