org.apache.directory.ldap.client.api.future
Class ExtendedFuture

java.lang.Object
  extended by org.apache.directory.ldap.client.api.future.ResponseFuture<ExtendedResponse>
      extended by org.apache.directory.ldap.client.api.future.ExtendedFuture
All Implemented Interfaces:
java.util.concurrent.Future<ExtendedResponse>

public class ExtendedFuture
extends ResponseFuture<ExtendedResponse>

A Future to manage ExtendedRequests

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.ldap.client.api.future.ResponseFuture
cancelled, connection, messageId, queue
 
Constructor Summary
ExtendedFuture(LdapConnection connection, int messageId)
          Creates a new instance of ExtendedFuture.
 
Method Summary
 ExtendedResponse get()
          Get the ExtendedResponse, blocking until one is received.
 ExtendedResponse get(long timeout, java.util.concurrent.TimeUnit unit)
          Get the ExtendedResponse, blocking until one is received, or until the given timeout is reached.
 java.lang.String toString()
          
 
Methods inherited from class org.apache.directory.ldap.client.api.future.ResponseFuture
cancel, isCancelled, isDone, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedFuture

public ExtendedFuture(LdapConnection connection,
                      int messageId)
Creates a new instance of ExtendedFuture.

Method Detail

get

public ExtendedResponse get()
                     throws java.lang.InterruptedException,
                            java.util.concurrent.ExecutionException
Get the ExtendedResponse, blocking until one is received.

Specified by:
get in interface java.util.concurrent.Future<ExtendedResponse>
Overrides:
get in class ResponseFuture<ExtendedResponse>
Returns:
The ExtendedResponse
Throws:
java.lang.InterruptedException - if the operation has been cancelled by client
java.util.concurrent.ExecutionException

get

public ExtendedResponse get(long timeout,
                            java.util.concurrent.TimeUnit unit)
                     throws java.lang.InterruptedException,
                            java.util.concurrent.ExecutionException,
                            java.util.concurrent.TimeoutException
Get the ExtendedResponse, blocking until one is received, or until the given timeout is reached.

Specified by:
get in interface java.util.concurrent.Future<ExtendedResponse>
Overrides:
get in class ResponseFuture<ExtendedResponse>
Parameters:
timeout - Number of TimeUnit to wait
unit - The TimeUnit
Returns:
The ExtendedResponse The ExtendedResponse 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<ExtendedResponse>


Copyright © 2009-2011 Apache Software Foundation. All Rights Reserved.