intarsys runtime library

de.intarsys.tools.concurrent
Class AbstractFutureTask<R>

java.lang.Object
  extended by de.intarsys.tools.concurrent.AbstractFutureTask<R>
Type Parameters:
R -
All Implemented Interfaces:
Runnable, Future
Direct Known Subclasses:
CallbackFutureTask, TaskSequence, TaskStep

public abstract class AbstractFutureTask<R>
extends Object
implements Runnable, Future

This is an alternate implementation for FutureTask, which is in some cases not flexible enough.


Method Summary
 boolean cancel(boolean interrupt)
           
 R get()
           
 R get(long pMillisecTimeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 void run()
           
 void runAsync()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

cancel

public boolean cancel(boolean interrupt)
Specified by:
cancel in interface Future

get

public R get()
      throws InterruptedException,
             ExecutionException
Specified by:
get in interface Future
Throws:
InterruptedException
ExecutionException

get

public R get(long pMillisecTimeout,
             TimeUnit unit)
      throws InterruptedException,
             ExecutionException,
             TimeoutException
Specified by:
get in interface Future
Throws:
InterruptedException
ExecutionException
TimeoutException

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future

isDone

public boolean isDone()
Specified by:
isDone in interface Future

run

public final void run()
Specified by:
run in interface Runnable

runAsync

public void runAsync()

toString

public String toString()
Overrides:
toString in class Object

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.