com.atlassian.fisheye.plugins.scm.utils.process
Class LineOutputHandler

java.lang.Object
  extended by com.atlassian.fisheye.plugins.scm.utils.process.BaseOutputHandler
      extended by com.atlassian.fisheye.plugins.scm.utils.process.LineOutputHandler
All Implemented Interfaces:
OutputHandler

public abstract class LineOutputHandler
extends BaseOutputHandler

An Output Handler which breaks the output from the process into discrete lines and processes each line in turn. Subclasses provide the appropriate implementation of the per-line processing method.


Constructor Summary
protected LineOutputHandler()
           
protected LineOutputHandler(java.lang.String encoding)
           
 
Method Summary
 void process(java.io.InputStream output)
          Process an output stream generated by the external process (either stdout or stderr)
protected abstract  void processLine(int lineNum, java.lang.String line)
          Process the given line
 
Methods inherited from class com.atlassian.fisheye.plugins.scm.utils.process.BaseOutputHandler
cancelProcess, complete, resetWatchdog, setWatchdog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineOutputHandler

protected LineOutputHandler()

LineOutputHandler

protected LineOutputHandler(java.lang.String encoding)
Method Detail

process

public void process(java.io.InputStream output)
             throws ProcessException
Description copied from interface: OutputHandler
Process an output stream generated by the external process (either stdout or stderr)

Parameters:
output - the external process' output stream (available as an input to this class)
Throws:
ProcessException - if there is a problem processing the output

processLine

protected abstract void processLine(int lineNum,
                                    java.lang.String line)
Process the given line

Parameters:
lineNum - The line number of the line being processed
line - the content of the line