org.starhope.appius.game.js
Class JavaScriptRunnerThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.starhope.appius.game.js.JavaScriptRunnerThread
All Implemented Interfaces:
Runnable

public class JavaScriptRunnerThread
extends Thread

A thread executing JavaScript code

Author:
brpocock@star-hope.org

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  org.mozilla.javascript.Scriptable globalScope
          WRITEME: Document this brpocock@star-hope.org
private static JavaScriptHelper helper
          WRITEME: Document this brpocock@star-hope.org
private  org.mozilla.javascript.Context jsCx
          JavaScript context
private  org.mozilla.javascript.Script myScript
          compiled script
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JavaScriptRunnerThread(String scriptName, AbstractUser user)
          WRITEME: Document this constructor brpocock@star-hope.org
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

helper

private static final JavaScriptHelper helper
WRITEME: Document this brpocock@star-hope.org


jsCx

private final org.mozilla.javascript.Context jsCx
JavaScript context


myScript

private final org.mozilla.javascript.Script myScript
compiled script


globalScope

private final org.mozilla.javascript.Scriptable globalScope
WRITEME: Document this brpocock@star-hope.org

Constructor Detail

JavaScriptRunnerThread

public JavaScriptRunnerThread(String scriptName,
                              AbstractUser user)
                       throws IOException
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
scriptName - WRITEME
user - WRITEME
Throws:
FileNotFoundException - duh.
IOException - duh.
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Thread.run()