gov.sandia.cognition.io
Class ProcessLauncherEvent

java.lang.Object
  extended by gov.sandia.cognition.io.ProcessLauncherEvent

public class ProcessLauncherEvent
extends Object

Event that gets fired when the ProcessLauncher is updated (for example, the underlying process writes to stdout or stderr, or terminates)

Since:
1.0
Author:
Kevin R. Dixon

Nested Class Summary
static class ProcessLauncherEvent.EventType
          Types of events that may be fired
 
Constructor Summary
ProcessLauncherEvent(ProcessLauncherEvent.EventType type, String currentLine, Process process)
          Creates a new instance of ProcessLauncherEvent
 
Method Summary
 String getCurrentLine()
          Getter for currentLine
 Process getProcess()
          Getter for process
 ProcessLauncherEvent.EventType getType()
          Getter for type
protected  void setCurrentLine(String currentLine)
          Setter for currentLine
protected  void setProcess(Process process)
          Setter for process
protected  void setType(ProcessLauncherEvent.EventType type)
          Setter for type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessLauncherEvent

public ProcessLauncherEvent(ProcessLauncherEvent.EventType type,
                            String currentLine,
                            Process process)
Creates a new instance of ProcessLauncherEvent

Parameters:
type - Type of event
currentLine - If non-null, these tokens correspond to the current line on the stdout/stderr stream
process - The underlying process that fired this event
Method Detail

getType

public ProcessLauncherEvent.EventType getType()
Getter for type

Returns:
Type of event

setType

protected void setType(ProcessLauncherEvent.EventType type)
Setter for type

Parameters:
type - Type of event

getCurrentLine

public String getCurrentLine()
Getter for currentLine

Returns:
If non-null, this String corresponds to the current line on the stdout/stderr stream

setCurrentLine

protected void setCurrentLine(String currentLine)
Setter for currentLine

Parameters:
currentLine - If non-null, this String corresponds to the current line on the stdout/stderr stream

getProcess

public Process getProcess()
Getter for process

Returns:
The underlying process that fired this event

setProcess

protected void setProcess(Process process)
Setter for process

Parameters:
process - The underlying process that fired this event