console
Class SimpleInputStreamTask

java.lang.Object
  extended by java.lang.Thread
      extended by console.StreamTask
          extended by console.SimpleInputStreamTask
All Implemented Interfaces:
java.lang.Runnable

public class SimpleInputStreamTask
extends StreamTask

Thread for feeding input to a running subprocess.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  int SLEEP_DELAY
           
 
Fields inherited from class console.StreamTask
abortFlag, finishFlag
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SimpleInputStreamTask(java.io.OutputStream processOutput, java.io.PipedOutputStream userInput)
           
 
Method Summary
protected  void actionInsideWaitingLoop(java.io.BufferedReader inr)
          Run waiting loop inside.
protected  void afterWorking()
          Run AFTER: - main working loop ends - "finalOutputing()" method (under "finally" section)
protected  void beforeWorking()
          Run BEFORE main working loop starts (under "try" section)
protected  void exception_dumpToLog(java.lang.Exception e)
          By default dump data about exception to jEdit.Log BEFORE "exception_dumpToOwner()" method (under "catch" section)
protected  void exception_dumpToOwner(java.lang.Exception e)
          By default do nothing AFTER "exception_dumpToLog" method (under "catch" section)
protected  void flushData(java.lang.String _line)
          Flush string of data to working process.
 void run()
           
 
Methods inherited from class console.StreamTask
abort, finish
 
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

SLEEP_DELAY

protected int SLEEP_DELAY
Constructor Detail

SimpleInputStreamTask

public SimpleInputStreamTask(java.io.OutputStream processOutput,
                             java.io.PipedOutputStream userInput)
Method Detail

actionInsideWaitingLoop

protected void actionInsideWaitingLoop(java.io.BufferedReader inr)
                                throws java.lang.Exception
Run waiting loop inside.

Throws:
java.lang.Exception

beforeWorking

protected void beforeWorking()
                      throws java.lang.Exception
Run BEFORE main working loop starts (under "try" section)

Throws:
java.lang.Exception

flushData

protected void flushData(java.lang.String _line)
                  throws java.lang.Exception
Flush string of data to working process.

Parameters:
_line - string for flushing to working process (under "try" section)
Throws:
java.lang.Exception

afterWorking

protected void afterWorking()
Run AFTER: - main working loop ends - "finalOutputing()" method (under "finally" section)


exception_dumpToLog

protected void exception_dumpToLog(java.lang.Exception e)
By default dump data about exception to jEdit.Log BEFORE "exception_dumpToOwner()" method (under "catch" section)


exception_dumpToOwner

protected void exception_dumpToOwner(java.lang.Exception e)
By default do nothing AFTER "exception_dumpToLog" method (under "catch" section)


run

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