com.bareflow
Class Runtime

java.lang.Object
  extended by com.bareflow.Runtime
All Implemented Interfaces:
IRuntime

public class Runtime
extends java.lang.Object
implements IRuntime

This class provides default implementation for the IRuntime interface. It needs to subclassed only if developer needs to define special behavior to initialize (see init(IRuntimeContext)) and close (see close()) the runtime.

See Also:
ITask, IRuntimeContext

Constructor Summary
Runtime()
           
 
Method Summary
protected  void close()
          Closes this runtime.
protected  void init(IRuntimeContext ctx)
          Initializes this runtime
 void run(ITask task, IRuntimeContext ctx)
          Runs the task in the runtime context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Runtime

public Runtime()
Method Detail

init

protected void init(IRuntimeContext ctx)
Initializes this runtime

Parameters:
ctx - a runtime context this Runtime operates in

run

public final void run(ITask task,
                      IRuntimeContext ctx)
               throws BareflowException
Description copied from interface: IRuntime
Runs the task in the runtime context

Specified by:
run in interface IRuntime
Parameters:
task - task to run
ctx - runtime context
Throws:
BareflowException

close

protected void close()
Closes this runtime. This method should be overridden if special behavior required when closing runtime, such as clean up activiteis etc.