@SuppressWarnings({"rawtypes", "unchecked"}) @Override public void processCommand(final Object command) { assertValidated(command); final Handler commandHandler = manager.handlerFor(command.getClass()); commandHandler.handle(command); }
@SuppressWarnings({"unchecked", "rawtypes"}) @Override public void processCommands(final Object[] commands) { // TODO: exception management, should we stop on failure, or ignore and go on ? for (final Object command : commands) { assertValidated(command); final Handler commandHandler = manager.handlerFor(command.getClass()); commandHandler.handle(command); } }