org.mindswap.owls.process.execution
Interface ProcessMonitor

All Known Implementing Classes:
DefaultProcessMonitor, ExecutionMonitor.CustomProcessMonitor

public interface ProcessMonitor

An interface that descriubes functions to monitor process execution

Author:
Evren Sirin

Method Summary
 void executionFailed(ExecutionException e)
          Called when the execution fails due to an execption.
 void executionFinished()
          Called only once when the execution of the top-most process finishes.
 void executionFinished(Process process, ValueMap inputs, ValueMap outputs)
          Called after the execution of a process finishes.
 void executionStarted()
          Called only once when the execution of the top-most process starts
 void executionStarted(Process process, ValueMap inputs)
          Called before the execution of a process starts.
 int getMonitorFilter()
           
 void setMonitorFilter(int processType)
          Control if executionStarted and executionFinished will be called for all the processes or only for a specific type of processes.
 

Method Detail

executionStarted

void executionStarted()
Called only once when the execution of the top-most process starts


executionFinished

void executionFinished()
Called only once when the execution of the top-most process finishes. Note that if execution fails for any reason this function will not be called. Instead executionFailed() will be called.


executionStarted

void executionStarted(Process process,
                      ValueMap inputs)
Called before the execution of a process starts. The user has the option to modify the contents of the inputs. setMonitorFilter function can be used to control if this function will be called for all the processes or only for a specific type of processes (e.g. only atomic processes).

Parameters:
process -
inputs -

executionFinished

void executionFinished(Process process,
                       ValueMap inputs,
                       ValueMap outputs)
Called after the execution of a process finishes. The user has the option to modify the contents of outputs. setMonitorFilter function can be used to control if this function will be called for all the processes or only for a specific type of processes (e.g. only atomic processes).

Parameters:
process -
inputs -
outputs -

executionFailed

void executionFailed(ExecutionException e)
Called when the execution fails due to an execption. This function is intended to be hook where the user can do something to fix the problem, i.e. ask for additional inputs. There is no such support at the moment. The execution engine will throw the exception right after this function returns.

Parameters:
e -

setMonitorFilter

void setMonitorFilter(int processType)
Control if executionStarted and executionFinished will be called for all the processes or only for a specific type of processes. The constant values are defined in Process interface:

Bitwise combinations (bitwise or) of these values are also valid.

Parameters:
processType -

getMonitorFilter

int getMonitorFilter()


Copyright © 2004 Evren Sirin. All Rights Reserved.