Search in sources :

Example 1 with StartAmbariFailed

use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartAmbariFailed in project cloudbreak by hortonworks.

the class StartAmbariHandler method accept.

@Override
public void accept(Event<StartAmbariRequest> event) {
    Long stackId = event.getData().getStackId();
    Selectable response;
    try {
        ambariClusterCreationService.startAmbari(stackId);
        response = new StartAmbariSuccess(stackId);
    } catch (Exception e) {
        response = new StartAmbariFailed(stackId, e);
    }
    eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Also used : Selectable(com.sequenceiq.cloudbreak.cloud.event.Selectable) StartAmbariSuccess(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartAmbariSuccess) StartAmbariFailed(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartAmbariFailed)

Aggregations

Selectable (com.sequenceiq.cloudbreak.cloud.event.Selectable)1 StartAmbariFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartAmbariFailed)1 StartAmbariSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartAmbariSuccess)1