|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.process.ProgressTask
public class ProgressTask
An implementation of the Progress interface.
Field Summary |
---|
Fields inherited from interface org.geotools.process.Progress |
---|
WORKING |
Constructor Summary | |
---|---|
ProgressTask(Process process,
java.util.Map<java.lang.String,java.lang.Object> input)
Creates a ProgressTask that will execute the given Process when run. |
Method Summary | |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
protected void |
done()
This protected method is invoked when this process transitions to state isDone (whether normally or via cancellation). |
java.util.Map<java.lang.String,java.lang.Object> |
get()
|
java.util.Map<java.lang.String,java.lang.Object> |
get(long timeout,
java.util.concurrent.TimeUnit unit)
|
float |
getProgress()
Amount of work completed. |
boolean |
isCancelled()
|
boolean |
isDone()
|
void |
run()
Sets this ProgressTask to the result of the computation unless it has been canceled. |
protected boolean |
runAndReset()
Executes the process without setting its result, and then resets this ProgressTask to its initial state, failing to do so if the computation encounters an exception or is canceled. |
protected void |
set(java.util.Map<java.lang.String,java.lang.Object> value)
Sets the result of this ProgressTask to the given value unless this ProgressTask has already been set or has been canceled. |
protected void |
setException(java.lang.Throwable t)
Causes this ProgressTask to report an ExecutionException with the given throwable as its cause, unless this ProgressTask has already been set or has been canceled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgressTask(Process process, java.util.Map<java.lang.String,java.lang.Object> input)
process
- the process to executeinput
- the inputs to use when executing the process
java.lang.NullPointerException
- if process is nullMethod Detail |
---|
public float getProgress()
Progress
getProgress
in interface Progress
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<java.util.Map<java.lang.String,java.lang.Object>>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<java.util.Map<java.lang.String,java.lang.Object>>
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<java.util.Map<java.lang.String,java.lang.Object>>
public java.util.Map<java.lang.String,java.lang.Object> get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<java.util.Map<java.lang.String,java.lang.Object>>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public java.util.Map<java.lang.String,java.lang.Object> get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<java.util.Map<java.lang.String,java.lang.Object>>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
protected void done()
protected void set(java.util.Map<java.lang.String,java.lang.Object> value)
value
- the value to setprotected void setException(java.lang.Throwable t)
t
- the cause of failure.public void run()
run
in interface java.lang.Runnable
protected boolean runAndReset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |