public class AsyncSearchOperation extends AbstractAsyncOperation<SearchRequest,SearchResult>
| Modifier and Type | Class and Description |
|---|---|
protected class |
AsyncSearchOperation.AsyncSearchListener
Async search listener used to build a search result and invoke search request handlers.
|
AbstractOperation.ReopenOperationExceptionHandler| Modifier and Type | Field and Description |
|---|---|
private ExecutorService |
executorService
Cached thread executor to submit async operations to.
|
private boolean |
useMultiThreadedListener
Whether the listener should spawn a new thread to process each result.
|
logger| Constructor and Description |
|---|
AsyncSearchOperation(Connection conn)
Creates a new async search operation.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
getAsyncRequestHandlers, getExceptionHandler, setAsyncRequestHandlers, setExceptionHandlerexecuteHandlers, getConnection, getOperationExceptionHandler, getOperationResponseHandlers, setOperationExceptionHandler, setOperationResponseHandlers, toStringprivate final ExecutorService executorService
private boolean useMultiThreadedListener
public AsyncSearchOperation(Connection conn)
conn - connectionpublic boolean getUseMultiThreadedListener()
public void setUseMultiThreadedListener(boolean b)
b - make the listener multi-threadedpublic FutureResponse<SearchResult> execute(SearchRequest request) throws LdapException
Operationexecute in interface Operation<SearchRequest,SearchResult>execute in class AbstractOperation<SearchRequest,SearchResult>request - containing the data required by this operationLdapException - if the operation failsprotected Response<SearchResult> invoke(SearchRequest request) throws LdapException
AbstractOperationinvoke in class AbstractOperation<SearchRequest,SearchResult>request - ldap requestLdapException - if the invocation failspublic void shutdown()
ExecutorService.shutdown() on the underlying executor service.Copyright © 2003-2019 Virginia Tech. All Rights Reserved.