org.ldaptive.async
Class AsyncSearchOperation

java.lang.Object
  extended by org.ldaptive.AbstractOperation<Q,S>
      extended by org.ldaptive.async.AbstractAsyncOperation<SearchRequest,SearchResult>
          extended by org.ldaptive.async.AsyncSearchOperation
All Implemented Interfaces:
Operation<SearchRequest,SearchResult>

public class AsyncSearchOperation
extends AbstractAsyncOperation<SearchRequest,SearchResult>

Executes an asynchronous ldap search operation.

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

Nested Class Summary
protected  class AsyncSearchOperation.AsyncSearchListener
          Async search listener used to build a search result and invoke search request handlers.
 
Nested classes/interfaces inherited from class org.ldaptive.AbstractOperation
AbstractOperation.ReopenOperationExceptionHandler
 
Field Summary
 
Fields inherited from class org.ldaptive.AbstractOperation
logger
 
Constructor Summary
AsyncSearchOperation(Connection conn)
          Creates a new async search operation.
 
Method Summary
 FutureResponse<SearchResult> execute(SearchRequest request)
          Execute this ldap operation.
protected  void finalize()
          
 boolean getUseMultiThreadedListener()
          Returns whether the listener should spawn a new thread to process each result.
protected  Response<SearchResult> invoke(SearchRequest request)
          Call the provider specific implementation of this ldap operation.
 void setUseMultiThreadedListener(boolean b)
          Sets whether the listener should spawn a new thread to process each result.
 void shutdown()
          Invokes ExecutorService.shutdown() on the underlying executor service.
 
Methods inherited from class org.ldaptive.async.AbstractAsyncOperation
getAsyncRequestHandlers, getExceptionHandler, setAsyncRequestHandlers, setExceptionHandler
 
Methods inherited from class org.ldaptive.AbstractOperation
executeHandlers, getConnection, getOperationExceptionHandler, getOperationResponseHandlers, setOperationExceptionHandler, setOperationResponseHandlers, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsyncSearchOperation

public AsyncSearchOperation(Connection conn)
Creates a new async search operation.

Parameters:
conn - connection
Method Detail

getUseMultiThreadedListener

public boolean getUseMultiThreadedListener()
Returns whether the listener should spawn a new thread to process each result.

Returns:
whether the listener is multi-threaded

setUseMultiThreadedListener

public void setUseMultiThreadedListener(boolean b)
Sets whether the listener should spawn a new thread to process each result.

Parameters:
b - make the listener multi-threaded

execute

public FutureResponse<SearchResult> execute(SearchRequest request)
                                     throws LdapException
Execute this ldap operation.

Specified by:
execute in interface Operation<SearchRequest,SearchResult>
Overrides:
execute in class AbstractOperation<SearchRequest,SearchResult>
Parameters:
request - containing the data required by this operation
Returns:
response for this operation
Throws:
LdapException - if the operation fails

invoke

protected Response<SearchResult> invoke(SearchRequest request)
                                 throws LdapException
Call the provider specific implementation of this ldap operation.

Specified by:
invoke in class AbstractOperation<SearchRequest,SearchResult>
Parameters:
request - ldap request
Returns:
ldap response
Throws:
LdapException - if the invocation fails

shutdown

public void shutdown()
Invokes ExecutorService.shutdown() on the underlying executor service.


finalize

protected void finalize()
                 throws Throwable

Overrides:
finalize in class Object
Throws:
Throwable


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