class DataUploaderProviderManager {

    @Async("taskExecutor")
    @SuppressWarnings("PMD.AvoidCatchingGenericException")
    public void transferData(TransferTask transferTask) {
        try {
            dataUploaderProvider.getStorageUploader(transferTask).transfer(transferTask);
            log.info(String.format("File has been successfully transferred from %s to %s.",
                transferTask.getSource().getPath(), transferTask.getDestination().getPath()));
            taskService.updateStatus(transferTask.getId(), TaskStatus.SUCCESS);
        } catch (Exception e) {
            taskService.updateStatus(transferTask.getId(), TaskStatus.FAILURE, e.getMessage());
            log.error(String.format("Transfer data went bad due to: %s", e.getMessage()), e);
        }
    }

}