Package jadex.commons.concurrent
Class ThreadPool.ServiceThread
- java.lang.Object
-
- java.lang.Thread
-
- jadex.commons.concurrent.ThreadPool.ServiceThread
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- ThreadPool
public class ThreadPool.ServiceThread extends java.lang.ThreadA service thread executes tasks.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleannotifiedprotected java.lang.RunnabletaskThe actual task.protected booleanterminated
-
Constructor Summary
Constructors Constructor Description ServiceThread()Create a new thread.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.RunnablegetTask()Get the runnable (the task).protected voidmarkParked()(method "park" already exists in android - do not overwrite)protected voidmarkUnpark()(method "unpark" already exists in android - do not overwrite)protected voidremove()Remove the service thread from the pool.voidrun()Dequeue an element from the queue and execute it.java.lang.StringtoString()Get the string representation.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yield
-
-
-
-
Method Detail
-
run
public void run()
Dequeue an element from the queue and execute it.- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
markParked
protected void markParked()
(method "park" already exists in android - do not overwrite)
-
markUnpark
protected void markUnpark()
(method "unpark" already exists in android - do not overwrite)
-
remove
protected void remove()
Remove the service thread from the pool.
-
getTask
public java.lang.Runnable getTask()
Get the runnable (the task).- Returns:
- The runnable.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Thread
-
-