Search in sources :

Example 1 with StartAmbariServicesFailed

use of com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StartAmbariServicesFailed in project cloudbreak by hortonworks.

the class StartAmbariServicesHandler method accept.

@Override
public void accept(Event<StartAmbariServicesRequest> event) {
    Long stackId = event.getData().getStackId();
    Selectable response;
    try {
        clusterServiceRunner.runAmbariServices(stackId);
        response = new StartAmbariServicesSuccess(stackId);
    } catch (Exception e) {
        response = new StartAmbariServicesFailed(stackId, e);
    }
    eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Also used : Selectable(com.sequenceiq.cloudbreak.cloud.event.Selectable) StartAmbariServicesFailed(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StartAmbariServicesFailed) StartAmbariServicesSuccess(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StartAmbariServicesSuccess)

Aggregations

Selectable (com.sequenceiq.cloudbreak.cloud.event.Selectable)1 StartAmbariServicesFailed (com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StartAmbariServicesFailed)1 StartAmbariServicesSuccess (com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StartAmbariServicesSuccess)1