Project Wonder 5.0

er.extensions.concurrency
Class ERXTaskThread

java.lang.Object
  extended by java.lang.Thread
      extended by er.extensions.concurrency.ERXTaskThread
All Implemented Interfaces:
java.lang.Runnable

public class ERXTaskThread
extends java.lang.Thread

This is the custom Thread subclass that is used for running background tasks. This Thread subclass is automatically created by the ERXTaskThreadFactory which in turn is used by the ERXTaskThreadPoolExecutor The purpose of this subclass is

A user does not generally need to instantiate this class. This class is generally used by ExecutorService instances that are created by ERXExecutorService static utility methods.

See Also:
ERXTaskThreadPoolExecutor, ERXExecutorService, ERXTaskThreadFactory
Author:
kieran

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
ERXTaskThread(java.lang.Runnable target)
           
 
Method Summary
 java.lang.String elapsedTime()
           
 void setTask(java.lang.Runnable task)
           
 void startStopWatch()
           
 void stopStopWatch()
           
 java.lang.Runnable task()
           
static
<T> com.webobjects.foundation.NSArray<T>
taskForTaskClass(java.lang.Class<T> clazz)
           
static com.webobjects.foundation.NSArray taskInfos()
           
static com.webobjects.foundation.NSArray tasks()
           
 
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
 

Constructor Detail

ERXTaskThread

public ERXTaskThread(java.lang.Runnable target)
Method Detail

task

public java.lang.Runnable task()
Returns:
the current task being executed

setTask

public void setTask(java.lang.Runnable task)
Parameters:
task - the current task being executed TODO: Check if the Runnable is a Future wrapping the real task and unwrap it.

tasks

public static com.webobjects.foundation.NSArray tasks()
Returns:
NSArray of background tasks

taskInfos

public static com.webobjects.foundation.NSArray taskInfos()
Returns:
NSArray of ERXTaskInfo

taskForTaskClass

public static <T> com.webobjects.foundation.NSArray<T> taskForTaskClass(java.lang.Class<T> clazz)

startStopWatch

public void startStopWatch()

elapsedTime

public java.lang.String elapsedTime()

stopStopWatch

public void stopStopWatch()

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.