public abstract class AbstractFuture<T> extends Object implements NotifyFuture<T>
Constructor and Description |
---|
AbstractFuture() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(FutureListener<T> listener) |
void |
addListener(Runnable listener) |
boolean |
cancel(boolean mayInterruptIfRunning) |
protected T |
fetchResult() |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
removeListener(FutureListener<T> listener) |
void |
removeListener(Runnable listener) |
protected void |
setError(Throwable error) |
protected void |
setResult(T result) |
public void addListener(FutureListener<T> listener)
addListener
in interface NotifyFuture<T>
public void addListener(Runnable listener)
addListener
in interface NotifyFuture<T>
public void removeListener(FutureListener<T> listener)
removeListener
in interface NotifyFuture<T>
public void removeListener(Runnable listener)
removeListener
in interface NotifyFuture<T>
protected void setResult(T result)
protected void setError(Throwable error)
public boolean cancel(boolean mayInterruptIfRunning)
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
protected T fetchResult() throws ExecutionException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
public boolean isCancelled()
isCancelled
in interface Future<T>
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.