fable.python.jep
Class StdoutRead

java.lang.Object
  extended by java.lang.Thread
      extended by fable.python.jep.StdoutRead
All Implemented Interfaces:
java.lang.Runnable

public class StdoutRead
extends java.lang.Thread

Redirect a file to System.out and/or FableMessageConsole. This class is used to listen to python stdout. A current console must be created as output message are redirect in FableMessageConsole. The class has setter methods to select outputting to System.out and/or FableMessageConsole.

Author:
GOETZ SUCHET

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 long lasttime
           
 boolean stopped
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
StdoutRead(java.lang.String filename)
           
 
Method Summary
 void run()
           
 void setOutputToFableConsole(boolean value)
          set the flag to output to System.out to true or false
 void setOutputToSystemOut(boolean value)
          set the flag to output to System.out to true or false
 
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
 

Field Detail

stopped

public boolean stopped

lasttime

public long lasttime
Constructor Detail

StdoutRead

public StdoutRead(java.lang.String filename)
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

setOutputToSystemOut

public void setOutputToSystemOut(boolean value)
set the flag to output to System.out to true or false

Parameters:
value - - true (output to System.out) or false (do not output to System.out)

setOutputToFableConsole

public void setOutputToFableConsole(boolean value)
set the flag to output to System.out to true or false

Parameters:
value - - true (output to FableMessageConsole) or false (do not output to FableMessageConsole)