Esempio n. 1
0
 @SuppressWarnings({"rawtypes", "unchecked"})
 @Override
 public void processCommand(final Object command) {
   assertValidated(command);
   final Handler commandHandler = manager.handlerFor(command.getClass());
   commandHandler.handle(command);
 }
Esempio n. 2
0
 @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);
   }
 }