*/
@SuppressWarnings("unchecked")
private void callCommand(final Wave wave) {
// Use the Wave UID to guarantee that a new fresh command is built and used !
final Command command = wave.contains(JRebirthWaves.REUSE_COMMAND) && wave.get(JRebirthWaves.REUSE_COMMAND)
? getGlobalFacade().getCommandFacade().retrieve((Class<Command>) wave.getRelatedClass())
: getGlobalFacade().getCommandFacade().retrieve((Class<Command>) wave.getRelatedClass(), wave.getWUID());
if (command == null) {
LOGGER.error(COMMAND_NOT_FOUND_ERROR, wave.toString());
if (JRebirthParameters.DEVELOPER_MODE.get()) {
this.unprocessedWaveHandler.manageUnprocessedWave(COMMAND_NOT_FOUND_MESSAGE.getText(), wave);
}
} else {
// Run the command into the predefined thread
command.run(wave);
}
}