Package org.forgerock.json.resource
Class IdentifierQueryResourceHandler
- java.lang.Object
 - 
- org.forgerock.json.resource.IdentifierQueryResourceHandler
 
 
- 
- All Implemented Interfaces:
 QueryResourceHandler
public class IdentifierQueryResourceHandler extends Object implements QueryResourceHandler
QueryResourceHandlerthat searches for a specific identifier value. 
- 
- 
Constructor Summary
Constructors Constructor Description IdentifierQueryResourceHandler(String id)Creates a newQueryResourceHandlerfor the given identifier. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()Gets the identifier being queried for.ResourceResponsegetResourceResponse()Gets theResourceResponsequery result.booleanhandleResource(ResourceResponse resource)Invoked each time a matching JSON resource is returned from a query request. 
 - 
 
- 
- 
Constructor Detail
- 
IdentifierQueryResourceHandler
public IdentifierQueryResourceHandler(String id)
Creates a newQueryResourceHandlerfor the given identifier.- Parameters:
 id- Identifier to query for
 
 - 
 
- 
Method Detail
- 
handleResource
public boolean handleResource(ResourceResponse resource)
Description copied from interface:QueryResourceHandlerInvoked 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.- Specified by:
 handleResourcein interfaceQueryResourceHandler- 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).
 
- 
getId
public String getId()
Gets the identifier being queried for.- Returns:
 - Identifier
 
 
- 
getResourceResponse
public ResourceResponse getResourceResponse()
Gets theResourceResponsequery result.- Returns:
 ResourceResponseornullif not yet found
 
 - 
 
 -