de.phleisch.app.itsucks.core.impl
Class WorkerThreadImpl
java.lang.Object
de.phleisch.app.itsucks.core.impl.WorkerThreadImpl
- All Implemented Interfaces:
- WorkerThread, java.lang.Runnable
public class WorkerThreadImpl
- extends java.lang.Object
- implements java.lang.Runnable, WorkerThread
This is a single worker to process a job.
It is manged by the WorkerPool.
The WorkerThread has an interface to add queued commands.
So multiple jobs or commands can be given to an workerthread which are
processed synchronously.
- Author:
- olli
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WorkerThreadImpl
public WorkerThreadImpl(WorkerPool pWorkerPool,
java.lang.String pName)
abort
public void abort()
- Specified by:
abort in interface WorkerThread
run
public void run()
- Specified by:
run in interface java.lang.Runnable
start
public void start()
- Specified by:
start in interface WorkerThread
join
public void join(long pMillis)
throws java.lang.InterruptedException
- Specified by:
join in interface WorkerThread
- Throws:
java.lang.InterruptedException
addCommand
public void addCommand(int pCmd)
- Specified by:
addCommand in interface WorkerThread
getJob
public Job getJob()
- Specified by:
getJob in interface WorkerThread
setJob
public void setJob(Job pJob)
- Specified by:
setJob in interface WorkerThread
Copyright © 2008. All Rights Reserved.