*/
@SuppressWarnings("unchecked")
private void returnData(final Wave wave) {
// Use only the Service class to retrieve the same instance each time
final Service service = getGlobalFacade().getServiceFacade().retrieve((Class<Service>) wave.getRelatedClass());
if (service == null) {
LOGGER.error(SERVICE_NOT_FOUND_ERROR, wave.toString());
if (JRebirthParameters.DEVELOPER_MODE.get()) {
this.unprocessedWaveHandler.manageUnprocessedWave(SERVICE_NOT_FOUND_MESSAGE.getText(), wave);
}
} else {
// The inner task will be run into the JRebirth Thread Pool
final ServiceTask<?> task = service.returnData(wave);
if (task != null && JRebirthParameters.FOLLOW_UP_SERVICE_TASKS.get()) {
getGlobalFacade().getServiceFacade().retrieve(TaskTrackerService.class).trackTask(task);
}
}