de.enough.polish.processing
Class ProcessingThread
java.lang.Object
java.lang.Thread
de.enough.polish.processing.ProcessingThread
- All Implemented Interfaces:
- Runnable
public class ProcessingThread
- extends Thread
- implements Runnable
Implements a thread that is responsible for managing all Processing related activities and events. The thread automatically starts when there is at least one Processing object in the Processing objects list and automatically stops when the object list is empty.
- Author:
- Ovidiu Iliescu
| 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 |
objects
protected static Vector objects
events
protected static Vector events
thread
protected static Thread thread
ProcessingThread
public ProcessingThread()
addProcessingObject
public static void addProcessingObject(ProcessingInterface object)
- Add a new Processing object to the internal Processing objects list.
- Parameters:
object -
queueEvent
public static void queueEvent(ProcessingEvent event)
- Queue an event
- Parameters:
event - the event to queue
removeProcessingObject
public static void removeProcessingObject(ProcessingInterface object)
- Remove a processing object from the internal list.
- Parameters:
object - the processing object to remove
startThread
protected static void startThread(Runnable object)
- Start a new thread
- Parameters:
object - the runnable object which should run in a new thread
run
public void run()
- The actual code of the thread.
- Specified by:
run in interface Runnable- Overrides:
run in class Thread