|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.ldap.client.api.future.ResponseFuture<R>
public class ResponseFuture<R>
A Future implementation used in LdapConnection operations.
Field Summary | |
---|---|
protected boolean |
cancelled
flag to determine if this future is cancelled |
protected LdapConnection |
connection
The connection used by the request |
protected int |
messageId
The messageID for this future |
protected java.util.concurrent.BlockingQueue<R> |
queue
the blocking queue holding LDAP responses |
Constructor Summary | |
---|---|
ResponseFuture(LdapConnection connection,
int messageId)
Creates a new instance of ResponseFuture. |
Method Summary | |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
R |
get()
|
R |
get(long timeout,
java.util.concurrent.TimeUnit unit)
|
boolean |
isCancelled()
|
boolean |
isDone()
This operation is not supported in this implementation of Future |
void |
set(R response)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.concurrent.BlockingQueue<R> queue
protected boolean cancelled
protected int messageId
protected LdapConnection connection
Constructor Detail |
---|
public ResponseFuture(LdapConnection connection, int messageId)
connection
- The LdapConnection used by the requestmessageId
- The associated message IDMethod Detail |
---|
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<R>
public R get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<R>
java.lang.InterruptedException
- if the operation has been cancelled by client
java.util.concurrent.ExecutionException
public void set(R response) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.lang.InterruptedException
- if the operation has been cancelled by client
java.util.concurrent.ExecutionException
public R get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<R>
java.lang.InterruptedException
- if the operation has been cancelled by client
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<R>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<R>
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |