org.ldaptive.control.util
Class PersistentSearchClient

java.lang.Object
  extended by org.ldaptive.control.util.PersistentSearchClient

public class PersistentSearchClient
extends Object

Client that simplifies using the persistent search control.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
protected  org.slf4j.Logger logger
          Logger for this class.
 
Constructor Summary
PersistentSearchClient(Connection conn, EnumSet<PersistentSearchChangeType> types, boolean co, boolean re)
          Creates a new persistent search client.
 
Method Summary
 void abandon(int messageId)
          Invokes an abandon operation on the supplied ldap message id.
 BlockingQueue<PersistentSearchItem> execute(SearchRequest request)
          Invokes execute(SearchRequest, int) with a capacity of Integer.MAX_VALUE.
 BlockingQueue<PersistentSearchItem> execute(SearchRequest request, int capacity)
          Performs an async search operation with the PersistentSearchRequestControl.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Logger for this class.

Constructor Detail

PersistentSearchClient

public PersistentSearchClient(Connection conn,
                              EnumSet<PersistentSearchChangeType> types,
                              boolean co,
                              boolean re)
Creates a new persistent search client.

Parameters:
conn - to execute the async search operation on
types - persistent search change types
co - whether only changed entries are returned
re - return an Entry Change Notification control
Method Detail

execute

public BlockingQueue<PersistentSearchItem> execute(SearchRequest request)
                                            throws LdapException
Invokes execute(SearchRequest, int) with a capacity of Integer.MAX_VALUE.

Parameters:
request - search request to execute
Returns:
blocking queue to wait for persistent search items
Throws:
LdapException - if the search fails

execute

public BlockingQueue<PersistentSearchItem> execute(SearchRequest request,
                                                   int capacity)
                                            throws LdapException
Performs an async search operation with the PersistentSearchRequestControl. The supplied request is modified in the following way:

The search request object should not be reused for any other search operations.

Parameters:
request - search request to execute
capacity - of the returned blocking queue
Returns:
blocking queue to wait for persistent search items
Throws:
LdapException - if the search fails

abandon

public void abandon(int messageId)
             throws LdapException
Invokes an abandon operation on the supplied ldap message id. Convenience method supplied to abandon persistent search operations.

Parameters:
messageId - of the operation to abandon
Throws:
LdapException - if the abandon operation fails


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.