for (CommandExecutionListener listener : listeners)
{
listener.preCommandExecuted(command, executionContext);
}
Result currentResult = command.execute(executionContext);
for (CommandExecutionListener listener : listeners)
{
listener.postCommandExecuted(command, executionContext, currentResult);
}
results.add(currentResult);