Package com.tnsai.actions.executors
Interface TypedActionExecutor
- All Known Implementing Classes:
LLMRoleExecutor,McpToolExecutor,WebServiceExecutor
public interface TypedActionExecutor
Interface for type-specific action executors.
Each ActionType (except LOCAL) has a dedicated executor implementing this interface.
Examples:
- WebServiceExecutor for WEB_SERVICE actions
- LLMRoleExecutor for LLM actions (tool dispatch is handled by ToolMethodDispatcher)
- McpToolExecutor for MCP_TOOL actions
Following ADR-004: Action Discovery via Reflection
-
Method Summary
-
Method Details
-
execute
Object execute(ActionMetadata action, Role role, Map<String, Object> parameters, Map<String, Object> context) Executes an action with the given parameters and context.- Parameters:
action- The action metadata containing annotation detailsrole- The role instance that contains the methodparameters- The parameters for the action (from message or executeAction call)context- Additional context (e.g., LLM client reference, agent reference)- Returns:
- The execution result
- Throws:
ActionExecutionException- if execution fails
-