org.javasteps
Interface Process

All Superinterfaces:
ProcessContext
All Known Implementing Classes:
ProcessImpl

public interface Process
extends ProcessContext

The Process interface represents a process that is created from a process definitions file

Version:
1.1
Author:
Ran Kornfeld

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.javasteps.ProcessContext
ProcessContext.ProcessStatus
 
Method Summary
 void addProcessListener(ProcessListener listener)
          Adds a ProcessListener to the process to get process execution events.
 StepAction getExceptionHandler()
           
 void registerExceptionHandler(StepAction handler)
          Registers a process exception handler.
 void reset()
          Resets the process state.
 ProcessContext.ProcessStatus start()
          Starts the process from the first step
 
Methods inherited from interface org.javasteps.ProcessContext
getActionStepsCount, getParameter, getParameters, getStatus, isStopped, setParameter, stop
 

Method Detail

start

ProcessContext.ProcessStatus start()
Starts the process from the first step

Returns:
The status of the process

registerExceptionHandler

void registerExceptionHandler(StepAction handler)
Registers a process exception handler. The StepAction will be executed on StepActionExceptions

Parameters:
handler - The exception handler

getExceptionHandler

StepAction getExceptionHandler()
Returns:
Returns the exceptionHandler.

addProcessListener

void addProcessListener(ProcessListener listener)
Adds a ProcessListener to the process to get process execution events. Listeners can be added only when process is IDLE. Trying to add a listener on running process will do nothing.

Parameters:
listener - The process listener

reset

void reset()
Resets the process state. This method will change the status to IDLE, remove all process parameters and remove all ProcessListeners.