Source:
public void accept(Event<LaunchStackRequest> launchStackRequestEvent) { LOGGER.debug("Received event: {}", launchStackRequestEvent); LaunchStackRequest request = launchStackRequestEvent.getData(); CloudContext cloudContext = request.getCloudContext(); try { CloudConnector<Object> connector = cloudPlatformConnectors.get(cloudContext.getPlatformVariant()); AuthenticatedContext ac = connector.authentication().authenticate(cloudContext, request.getCloudCredential()); List<CloudResourceStatus> resourceStatus = connector.resources().launch(ac, request.getCloudStack(), persistenceNotifier, request.getAdjustmentType(), request.getThreshold()); List<CloudResource> resources = ResourceLists.transform(resourceStatus); PollTask<ResourcesStatePollerResult> task = statusCheckFactory.newPollResourcesStateTask(ac, resources, true); ResourcesStatePollerResult statePollerResult = ResourcesStatePollerResults.build(cloudContext, resourceStatus); if (!task.completed(statePollerResult)) { statePollerResult = syncPollingScheduler.schedule(task); } LaunchStackResult result = ResourcesStatePollerResults.transformToLaunchStackResult(request, statePollerResult); request.getResult().onNext(result); eventBus.notify(result.selector(), new Event<>(launchStackRequestEvent.getHeaders(), result)); LOGGER.debug("Launching the stack successfully finished for {}", cloudContext); } catch (Exception e) { if (ExceptionUtils.getRootCause(e) instanceof InterruptedException) { LOGGER.info("Interrupted exception is ignored as it has thrown because of graceful shutdown of the java process."); } LaunchStackResult failure = new LaunchStackResult(e, request.getResourceId()); LOGGER.warn("Error during launching the stack:", e); request.getResult().onNext(failure); eventBus.notify(failure.selector(), new Event<>(launchStackRequestEvent.getHeaders(), failure)); } }

Target:
public void accept(Event<LaunchStackRequest> launchStackRequestEvent) { LOGGER.debug("Received event: {}", launchStackRequestEvent); LaunchStackRequest request = launchStackRequestEvent.getData(); CloudContext cloudContext = request.getCloudContext(); try { CloudConnector<Object> connector = cloudPlatformConnectors.get(cloudContext.getPlatformVariant()); AuthenticatedContext ac = connector.authentication().authenticate(cloudContext, request.getCloudCredential()); List<CloudResourceStatus> resourceStatus = connector.resources().launch(ac, request.getCloudStack(), persistenceNotifier, request.getAdjustmentType(), request.getThreshold()); List<CloudResource> resources = ResourceLists.transform(resourceStatus); PollTask<ResourcesStatePollerResult> task = statusCheckFactory.newPollResourcesStateTask(ac, resources, true); ResourcesStatePollerResult statePollerResult = ResourcesStatePollerResults.build(cloudContext, resourceStatus); if (!task.completed(statePollerResult)) { statePollerResult = syncPollingScheduler.schedule(task); } LaunchStackResult result = ResourcesStatePollerResults.transformToLaunchStackResult(request, statePollerResult); request.getResult().onNext(result); eventBus.notify(result.selector(), new Event<>(launchStackRequestEvent.getHeaders(), result)); LOGGER.debug("Launching the stack successfully finished for {}", cloudContext); } catch (Exception e) { if (ExceptionUtils.getRootCause(e) instanceof InterruptedException) { LOGGER.info("Interrupted exception is ignored as it has been thrown because of graceful shutdown of the java process."); } LaunchStackResult failure = new LaunchStackResult(e, request.getResourceId()); LOGGER.warn("Error during launching the stack:", e); request.getResult().onNext(failure); eventBus.notify(failure.selector(), new Event<>(launchStackRequestEvent.getHeaders(), failure)); } }