org.apache.directory.ldap.client.api.future
Class SearchFuture
java.lang.Object
org.apache.directory.ldap.client.api.future.ResponseFuture<SearchResponse>
org.apache.directory.ldap.client.api.future.SearchFuture
- All Implemented Interfaces:
- java.util.concurrent.Future<SearchResponse>
public class SearchFuture
- extends ResponseFuture<SearchResponse>
A Future to manage SerachRequest
- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
Method Summary |
SearchResponse |
get()
Get the SearchResponse, blocking until one is received. |
SearchResponse |
get(long timeout,
java.util.concurrent.TimeUnit unit)
Get the SearchResponse, blocking until one is received, or until the
given timeout is reached. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SearchFuture
public SearchFuture(LdapConnection connection,
int messageId)
- Creates a new instance of SearchFuture.
- Parameters:
connection
- The LdapConnectionmessageId
- The associated messageId
get
public SearchResponse get()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
- Get the SearchResponse, blocking until one is received.
It can be either a SearchResultEntry, a SearchResultReference
or a SearchResultDone, the last of all the SearchResponse.
- Specified by:
get
in interface java.util.concurrent.Future<SearchResponse>
- Overrides:
get
in class ResponseFuture<SearchResponse>
- Returns:
- The SearchResponse
- Throws:
java.lang.InterruptedException
- if the operation has been cancelled by client
java.util.concurrent.ExecutionException
get
public SearchResponse get(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.util.concurrent.TimeoutException
- Get the SearchResponse, blocking until one is received, or until the
given timeout is reached.
- Specified by:
get
in interface java.util.concurrent.Future<SearchResponse>
- Overrides:
get
in class ResponseFuture<SearchResponse>
- Parameters:
timeout
- Number of TimeUnit to waitunit
- The TimeUnit
- Returns:
- The SearchResponse The SearchResponse found
- Throws:
java.lang.InterruptedException
- if the operation has been cancelled by client
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
toString
public java.lang.String toString()
-
- Overrides:
toString
in class ResponseFuture<SearchResponse>
Copyright © 2009-2011 Apache Software Foundation. All Rights Reserved.