org.jclouds.concurrent
Class ExceptionParsingListenableFuture<T>
java.lang.Object
org.jclouds.concurrent.ExceptionParsingListenableFuture<T>
- All Implemented Interfaces:
- com.google.common.util.concurrent.ListenableFuture<T>, Future<T>
public class ExceptionParsingListenableFuture<T>
- extends Object
- implements com.google.common.util.concurrent.ListenableFuture<T>
Transforms the exceptions in a future upon get
Temporarily here until the following is resolved: guava issue 310
- Author:
- Adrian Cole
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionParsingListenableFuture
public ExceptionParsingListenableFuture(com.google.common.util.concurrent.ListenableFuture<T> future,
com.google.common.base.Function<Exception,T> function)
create
public static <T> ExceptionParsingListenableFuture<T> create(com.google.common.util.concurrent.ListenableFuture<T> future,
com.google.common.base.Function<Exception,T> function)
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
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
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface Future<T>
isDone
public boolean isDone()
- Specified by:
isDone
in interface Future<T>
addListener
public void addListener(Runnable listener,
Executor exec)
- Specified by:
addListener
in interface com.google.common.util.concurrent.ListenableFuture<T>
Copyright © 2009-2011 jclouds. All Rights Reserved.