org.apache.http.nio.concurrent
Class BasicFuture<T>

java.lang.Object
  extended by org.apache.http.nio.concurrent.BasicFuture<T>
All Implemented Interfaces:
Future<T>

public class BasicFuture<T>
extends Object
implements Future<T>


Constructor Summary
BasicFuture(FutureCallback<T> callback)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 boolean completed(T result)
           
 boolean failed(Exception exception)
           
 T get()
           
 T get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicFuture

public BasicFuture(FutureCallback<T> callback)
Method Detail

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<T>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<T>

get

public T get()
      throws InterruptedException,
             ExecutionException
Specified by:
get in interface Future<T>
Throws:
InterruptedException
ExecutionException

get

public T get(long timeout,
             TimeUnit unit)
      throws InterruptedException,
             ExecutionException,
             TimeoutException
Specified by:
get in interface Future<T>
Throws:
InterruptedException
ExecutionException
TimeoutException

completed

public boolean completed(T result)

failed

public boolean failed(Exception exception)

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<T>


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.