R
- The result type returned by this Future's get methodpublic class ResponseFuture<R extends Response> extends Object implements Future<Response>
Constructor and Description |
---|
ResponseFuture(LdapConnection connection,
int messageId)
Creates a new instance of ResponseFuture.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel the Future
|
boolean |
cancel(boolean mayInterruptIfRunning) |
R |
get() |
R |
get(long timeout,
TimeUnit unit) |
Throwable |
getCause() |
boolean |
isCancelled() |
boolean |
isDone()
This operation is not supported in this implementation of Future.
|
void |
set(R response)
Set the associated Response in this Future
|
void |
setCause(Throwable cause)
Associate a cause to the ResponseFuture
|
String |
toString() |
public ResponseFuture(LdapConnection connection, int messageId)
connection
- The LdapConnection used by the requestmessageId
- The associated message IDpublic boolean cancel(boolean mayInterruptIfRunning)
public R get() throws InterruptedException
get
in interface Future<Response>
InterruptedException
- if the operation has been cancelled by clientpublic void set(R response) throws InterruptedException
response
- The response to add into the FutureInterruptedException
- if the operation has been cancelled by clientpublic R get(long timeout, TimeUnit unit) throws InterruptedException
get
in interface Future<Response>
InterruptedException
- if the operation has been cancelled by clientpublic boolean isCancelled()
isCancelled
in interface Future<Response>
public boolean isDone()
public void setCause(Throwable cause)
cause
- the cause to setpublic void cancel()
Copyright © 2003–2018 The Apache Software Foundation. All rights reserved.