stella
Class MasterLauncher.MasterHelper

java.lang.Object
  extended by java.lang.Thread
      extended by stella.MasterLauncher.MasterHelper
All Implemented Interfaces:
Runnable
Enclosing class:
MasterLauncher

protected class MasterLauncher.MasterHelper
extends Thread

The master launcher helper thread. This thread is responsible for checking replies registered to the incomming command (and sending them back accordingly), as well as calling the imbedding class's MasterLauncher.processCommand(stella.CommandEvent) method. It acts as a thread to allow fast return from the MasterLauncher.castCommand(stella.CommandEvent) method.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  CommandEvent cmd
          The command to process.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected MasterLauncher.MasterHelper(CommandEvent process)
          Constructs a new master helper thread.
 
Method Summary
private  void checkForward(String type)
          Checks the embedding's reply pattern list for a match to a reply event constructed from the type handed over and the command event registered.
 void run()
          The run method of the master helper.
 
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, 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
 

Field Detail

cmd

private CommandEvent cmd
The command to process.

Constructor Detail

MasterLauncher.MasterHelper

protected MasterLauncher.MasterHelper(CommandEvent process)
Constructs a new master helper thread. Starting of the thread must be done within the calling method.

Method Detail

run

public void run()
The run method of the master helper. This method does the following:

Specified by:
run in interface Runnable
Overrides:
run in class Thread

checkForward

private void checkForward(String type)
Checks the embedding's reply pattern list for a match to a reply event constructed from the type handed over and the command event registered. If a match is found the reply event created with the ReplyEvent.createMatch(java.lang.Object, java.lang.String, long, stella.CommandEvent) method is returned. Note that the returned reply event is neither a true acknowledge event nor a true done event and can therfore not be casted or instance tested to one of these reply subclasses.