protected class AsyncSearchOperation.AsyncSearchListener extends Object implements SearchListener
Constructor and Description |
---|
AsyncSearchListener(SearchRequest request)
Creates a new async search listener.
|
Modifier and Type | Method and Description |
---|---|
void |
asyncRequestReceived(AsyncRequest request)
Invoked when an asynchronous operation has begun.
|
void |
exceptionReceived(Exception exception)
Invoked when an exception is thrown from a provider indicating the operation cannot be completed.
|
Response<SearchResult> |
getResponse()
Returns the response data associated with this search, blocking until a response is available.
|
protected void |
processAsyncRequest(AsyncRequest request)
Invokes the handlers for the supplied async request.
|
protected void |
processSearchItem(SearchItem item)
Invokes the handlers for the supplied search item.
|
void |
responseReceived(Response<Void> response)
Invoked when a response is received from a provider indicating the operation has completed.
|
void |
searchItemReceived(SearchItem item)
Invoked when a search item is received from a provider.
|
public AsyncSearchListener(SearchRequest request)
request
- ldap search requestpublic void asyncRequestReceived(AsyncRequest request)
ResponseListener
asyncRequestReceived
in interface ResponseListener
request
- to abandon this operationpublic void searchItemReceived(SearchItem item)
SearchListener
searchItemReceived
in interface SearchListener
item
- containing a search result entry, reference, or intermediate responsepublic void responseReceived(Response<Void> response)
ResponseListener
responseReceived
in interface ResponseListener
response
- containing the resultpublic Response<SearchResult> getResponse() throws InterruptedException, LdapException
InterruptedException
- if this thread is interrupted before a response is receivedLdapException
- if the async search encountered an errorpublic void exceptionReceived(Exception exception)
ResponseListener
exceptionReceived
in interface ResponseListener
exception
- thrown from the async operationprotected void processAsyncRequest(AsyncRequest request) throws LdapException
responseReceived(Response)
if a handler
aborts the operation.request
- to handleLdapException
- if a handler throwsprotected void processSearchItem(SearchItem item) throws LdapException
responseReceived(Response)
if a handler aborts
the operation.item
- to handleLdapException
- if a handler throwsCopyright © 2021. All rights reserved.