public interface QueryResourceHandler
A query result completion handler may be specified when performing query
requests using a Connection
object. The QueryResourceHandler.handleResource(org.forgerock.json.resource.ResourceResponse)
method is invoked for each resource which matches the query criteria,
followed by returning a QueryResponse
or a ResourceException
indicating 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
handleResource
for a resource happens-before the invocation of handleResource
for the next
resource. Invocation of handleResource
for the final resource
happens-before returning a QueryResponse
or a
ResourceException
are invoked with the final query status. In other
words, query resource handler method invocations will occur sequentially and
one at a time.
Modifier and Type | Method and Description |
---|---|
boolean |
handleResource(ResourceResponse resource)
Invoked each time a matching JSON resource is returned from a query
request.
|
boolean handleResource(ResourceResponse 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.
resource
- The matching JSON resource.true
if this handler should continue to be notified of
any remaining matching JSON resources, or false
if the
remaining JSON resources should be skipped for some reason (e.g.
a client side size limit has been reached).Copyright © 2010-2018, ForgeRock All Rights Reserved.