The im4java Library, Version 1.4.0

org.im4java.process
Class ProcessEvent

java.lang.Object
  extended by org.im4java.process.ProcessEvent

public class ProcessEvent
extends java.lang.Object

This class wraps return-code and Exceptions of a terminated process.

Since:
0.06
Version:
$Revision: 1.4 $
Author:
$Author: bablokb $

Constructor Summary
ProcessEvent(int pPID, ProcessStarter pProcessStarter)
          Constructor (sets pid and ProcessStarter).
 
Method Summary
 java.lang.Exception getException()
          Query the exception-field of this event.
 int getPID()
          Query the process-id field of this event.
 java.lang.Process getProcess()
          Get the Process-object of this ProcessEvent.
 ProcessStarter getProcessStarter()
          Query the ProcessStarter field of this event.
 int getReturnCode()
          Get the return-code of the process.
 void setException(java.lang.Exception pException)
          Set the exception-field of this event.
 void setProcess(java.lang.Process pProcess)
          Set the Process-object of this ProcessEvent.
 void setReturnCode(int pReturnCode)
          Set the return-code of the process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessEvent

public ProcessEvent(int pPID,
                    ProcessStarter pProcessStarter)
Constructor (sets pid and ProcessStarter).

Parameters:
pPID - the process-id of this proces
pProcessStarter - the ProcessStarter generating this event
Method Detail

setReturnCode

public void setReturnCode(int pReturnCode)
Set the return-code of the process.

Parameters:
pReturnCode - the return-code to set.

getReturnCode

public int getReturnCode()
Get the return-code of the process. The return-code is only valid if no exception occured.

Returns:
the return-code of this Process.

setProcess

public void setProcess(java.lang.Process pProcess)
Set the Process-object of this ProcessEvent.

Parameters:
pProcess - the Process to set

getProcess

public java.lang.Process getProcess()
Get the Process-object of this ProcessEvent.

Returns:
the Process-object

setException

public void setException(java.lang.Exception pException)
Set the exception-field of this event.

Parameters:
pException - the iException to set

getException

public java.lang.Exception getException()
Query the exception-field of this event.

Returns:
the exception-field of this event

getPID

public int getPID()
Query the process-id field of this event.

Returns:
the process-id of the process related to this event.

getProcessStarter

public ProcessStarter getProcessStarter()
Query the ProcessStarter field of this event.

Returns:
the ProcessStarter which startetd the process related to this event.

The im4java Library, Version 1.4.0

Released under the LGPL, (c) Bernhard Bablok 2008-2010
Homepage: http://im4java.sourceforge.net/