com.openexchange.admin.taskmanagement
Class ExtendedFutureTask<V>
java.lang.Object
java.util.concurrent.FutureTask<V>
com.openexchange.admin.taskmanagement.ExtendedFutureTask<V>
- Type Parameters:
V
-
- All Implemented Interfaces:
- java.lang.Runnable, java.util.concurrent.Future<V>
public class ExtendedFutureTask<V>
- extends java.util.concurrent.FutureTask<V>
A FutureTask extented by Progress
- Author:
- d7
Constructor Summary |
ExtendedFutureTask(java.util.concurrent.Callable<V> callable,
java.lang.String typeofjob,
java.lang.String furtherinformation,
int id)
|
Methods inherited from class java.util.concurrent.FutureTask |
cancel, get, get, isCancelled, isDone, run |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtendedFutureTask
public ExtendedFutureTask(java.util.concurrent.Callable<V> callable,
java.lang.String typeofjob,
java.lang.String furtherinformation,
int id)
isRunning
public boolean isRunning()
- Convenience method for detecting if a job runs
- Returns:
isFailed
public boolean isFailed()
- Convenience method for detecting if a job failed
- Returns:
getProgressPercentage
public int getProgressPercentage()
throws java.lang.NoSuchMethodException
- Gets the progress percentage of the underlying job
- Returns:
- The progress in percent
- Throws:
java.lang.NoSuchMethodException
- If the job doesn't support this feature
getFurtherinformation
public final java.lang.String getFurtherinformation()
getTypeofjob
public final java.lang.String getTypeofjob()