use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.WaitForAmbariServerFailed in project cloudbreak by hortonworks.
the class WaitingAmbariServerHandler method accept.
@Override
public void accept(Event<WaitForAmbariServerRequest> event) {
Long stackId = event.getData().getStackId();
Selectable response;
try {
Stack stack = stackService.getById(stackId);
ambariClusterConnector.waitForServer(stack);
response = new WaitForAmbariServerSuccess(stackId);
} catch (Exception e) {
response = new WaitForAmbariServerFailed(stackId, e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Aggregations