weka.gui.scripting
Class Script.ScriptThread

java.lang.Object
  extended by java.lang.Thread
      extended by weka.gui.scripting.Script.ScriptThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
GroovyScript.GroovyThread, JythonScript.JythonThread
Enclosing class:
Script

public abstract static class Script.ScriptThread
extends Thread

The Thread for running a script.

Version:
$Revision: 8034 $
Author:
fracpete (fracpete at waikato dot ac dot nz)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Script.ScriptThread(Script owner, String[] args)
          Initializes the thread.
 
Method Summary
 String[] getArgs()
          Returns the commandline args.
 Script getOwner()
          Returns the owner.
 void run()
          Executes the script.
 void stopScript()
          Stops the script execution.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Script.ScriptThread

public Script.ScriptThread(Script owner,
                           String[] args)
Initializes the thread.

Parameters:
owner - the owning script
args - the commandline arguments
Method Detail

getOwner

public Script getOwner()
Returns the owner.

Returns:
the owning script

getArgs

public String[] getArgs()
Returns the commandline args.

Returns:
the arguments

run

public void run()
Executes the script.

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

stopScript

public void stopScript()
Stops the script execution.



Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.