org.gvsig.tools.task
Class AbstractMonitorableTask

java.lang.Object
  extended by java.lang.Thread
      extended by org.gvsig.tools.task.AbstractCancellableTask
          extended by org.gvsig.tools.task.AbstractMonitorableTask
All Implemented Interfaces:
Runnable, CancellableTask, MonitorableTask

public class AbstractMonitorableTask
extends AbstractCancellableTask
implements MonitorableTask

Author:
jjdelcerro Abstract class for tasks, threads, that implements the interface MonitorableTask. This handle the status of the cancelationRequest flag and TaskStatus.

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  SimpleTaskStatus taskStatus
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected AbstractMonitorableTask(String taskName)
           
 
Method Summary
 void cancelRequest()
          Request to the task that cancel.
 TaskStatus getTaskStatus()
           
 
Methods inherited from class org.gvsig.tools.task.AbstractCancellableTask
isCancellationRequested
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gvsig.tools.task.CancellableTask
isCancellationRequested
 

Field Detail

taskStatus

protected SimpleTaskStatus taskStatus
Constructor Detail

AbstractMonitorableTask

protected AbstractMonitorableTask(String taskName)
Method Detail

getTaskStatus

public TaskStatus getTaskStatus()
Specified by:
getTaskStatus in interface MonitorableTask

cancelRequest

public void cancelRequest()
Description copied from interface: CancellableTask
Request to the task that cancel.

Specified by:
cancelRequest in interface CancellableTask
Overrides:
cancelRequest in class AbstractCancellableTask


Copyright © 2004-2011 gvSIG. All Rights Reserved.