org.ow2.petals.microkernel.api.jbi.management
Interface Task


public interface Task

A Task is an execution unit, that can be executed or undo.

Tasks can be used by a processor that will execute them and reverse execution in case of fault.

Author:
Olivier Fabre - EBM WebSourcing

Method Summary
 void execute(Context context)
          Launch the task with the given context.
 void undo(Context context)
          Reverse the task in order to retrieve the environ state before execution of this task.
 

Method Detail

execute

void execute(Context context)
             throws Exception
Launch the task with the given context. Task can modify information included in this context during execution.

Parameters:
context - the execution context handling input and output information
Throws:
Exception - if an error occurs during Task processing

undo

void undo(Context context)
          throws Exception
Reverse the task in order to retrieve the environ state before execution of this task.

Parameters:
context - the execution context handling input and output information
Throws:
Exception - if an error occurs during Task unprocessing


Copyright © 2005-2015 Linagora. All Rights Reserved.