giovynet.serial
Class TaskParallel

java.lang.Object
  extended by java.lang.Thread
      extended by giovynet.serial.TaskParallel
All Implemented Interfaces:
java.lang.Runnable

public abstract class TaskParallel
extends java.lang.Thread

Thread to perform a task in parallel.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TaskParallel()
           
 
Method Summary
 void halt()
          Finish thread task.
abstract  void loopTask()
          Method in a loop executed concurrently.
 void off()
          Stop task.
 void on()
          Initiates task.
 void run()
           
 boolean status()
          Returns the status of task can be turned on(true) or off(false).
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskParallel

public TaskParallel()
Method Detail

halt

public void halt()
Finish thread task.


loopTask

public abstract void loopTask()
Method in a loop executed concurrently.


run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

on

public void on()
Initiates task.


off

public void off()
Stop task.


status

public boolean status()
Returns the status of task can be turned on(true) or off(false).

Returns:
boolean.
Throws:
java.lang.Exception