de.upb.swtpra05.group03.plugin
Class WorkerThread

java.lang.Object
  extended byjava.lang.Thread
      extended byde.upb.swtpra05.group03.plugin.WorkerThread
All Implemented Interfaces:
java.lang.Runnable

class WorkerThread
extends java.lang.Thread

Simulates a message-sending shuttle to demonstrate the plugin. Its not necessary to start a new kernel and run the shuttle.

Version:
$Revision: 1.3 $

Field Summary
private  ICabSShuttlePlugin plugin
          No comment provided by developer, please add a comment to improve documentation.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) WorkerThread()
           
 
Method Summary
private  int getRandomExecutionState()
          Helper method to generate random executionState values
 void run()
          Main processing method for the WorkerThread object, generates all messages and values, mostly random.
 void setPlugin(ICabSShuttlePlugin plugin)
          This method sets the plugin instance to which this WorkerThread will deliver all its messages.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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
 

Field Detail

plugin

private ICabSShuttlePlugin plugin
No comment provided by developer, please add a comment to improve documentation.

Constructor Detail

WorkerThread

WorkerThread()
Method Detail

setPlugin

public void setPlugin(ICabSShuttlePlugin plugin)
This method sets the plugin instance to which this WorkerThread will deliver all its messages.

Parameters:
plugin - The CompanyShuttlePlugin instance

run

public void run()
Main processing method for the WorkerThread object, generates all messages and values, mostly random.


getRandomExecutionState

private int getRandomExecutionState()
Helper method to generate random executionState values

Returns:
the execution state as integer