Interface CommandDispatcher

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
DefaultCommandDispatcher

public interface CommandDispatcher extends AutoCloseable
Central dispatcher that aggregates CommandGroups and handles command resolution, execution, and completion.

CommandDispatcher separates the aggregation and dispatch role from individual command semantics defined in Command and CommandGroup.

Example:

 CommandDispatcher dispatcher = new DefaultCommandDispatcher(terminal);
 dispatcher.addGroup(myGroup);
 Object result = dispatcher.execute("echo hello | grep h");
 
Since:
4.0
See Also: