View Javadoc

1   package cz.cuni.amis.pogamut.sposh.executor;
2   
3   import cz.cuni.amis.pogamut.sposh.engine.VariableContext;
4   
5   /**
6    * Interface that is used by posh engine to execute primitives.
7    * There may be multiple ways to execute primitives, original posh is just
8    * calling methods, we may want primitives executed in phases (like INIT, RUN*, FINISH).
9    * 
10   * @author Honza
11   */
12  public interface IWorkExecutor {
13      /**
14       * Execute primitive and get the result.
15       * @param primitive name of primitive
16       * @param ctx variable context for primitive, basically parameteres for primitive
17       * @return result of executed primitive
18       */
19      Object executePrimitive(String primitive, VariableContext ctx);
20  }