Class MultipleResponseFuture<R extends Response>
- java.lang.Object
-
- org.apache.directory.ldap.client.api.future.MultipleResponseFuture<R>
-
- Type Parameters:
R
- The result type returned by this Future's get method
- All Implemented Interfaces:
Future<R>
,ResponseFuture<R>
- Direct Known Subclasses:
BindFuture
,ExtendedFuture
,SearchFuture
public abstract class MultipleResponseFuture<R extends Response> extends Object implements ResponseFuture<R>
A Future implementation used in LdapConnection operations.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description MultipleResponseFuture(LdapConnection connection, int messageId)
Creates a new instance of ResponseFuture.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancel the Futureboolean
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 Futurevoid
setCause(Throwable cause)
Associate a cause to the ResponseFutureString
toString()
-
-
-
Constructor Detail
-
MultipleResponseFuture
public MultipleResponseFuture(LdapConnection connection, int messageId)
Creates a new instance of ResponseFuture.- Parameters:
connection
- The LdapConnection used by the requestmessageId
- The associated message ID
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
get
public R get() throws InterruptedException
- Specified by:
get
in interfaceFuture<R extends Response>
- Throws:
InterruptedException
- if the operation has been cancelled by client
-
set
public void set(R response) throws InterruptedException
Set the associated Response in this Future- Specified by:
set
in interfaceResponseFuture<R extends Response>
- Parameters:
response
- The response to add into the Future- Throws:
InterruptedException
- if the operation has been cancelled by client
-
get
public R get(long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
get
in interfaceFuture<R extends Response>
- Throws:
InterruptedException
- if the operation has been cancelled by client
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<R extends Response>
-
isDone
public boolean isDone()
This operation is not supported in this implementation of Future.
-
getCause
public Throwable getCause()
- Specified by:
getCause
in interfaceResponseFuture<R extends Response>
- Returns:
- the cause
-
setCause
public void setCause(Throwable cause)
Associate a cause to the ResponseFuture- Specified by:
setCause
in interfaceResponseFuture<R extends Response>
- Parameters:
cause
- the cause to set
-
cancel
public void cancel()
Cancel the Future- Specified by:
cancel
in interfaceResponseFuture<R extends Response>
-
-