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  	/**
15       * Execute sense and get the result.
16       * @param senseName name of primitive
17       * @param ctx variable context for sense containing possible parameters
18       * @return result of executed primitive
19       */
20  	Object executeSense(String senseName, VariableContext ctx);
21  	
22  	/**
23       * Execute action and get the result.
24       * @param actionName name of primitive
25       * @param ctx variable context for action containing possible parameters
26       * @return result of executed primitive
27       */
28  	ActionResult executeAction(String actionName, VariableContext ctx);
29  
30  }