Search in sources :

Example 1 with StartClusterFailed

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

the class StartClusterHandler method accept.

@Override
public void accept(Event<StartClusterRequest> event) {
    Long stackId = event.getData().getResourceId();
    Selectable response;
    try {
        clusterBuilderService.startCluster(stackId);
        response = new StartClusterSuccess(stackId);
    } catch (Exception e) {
        response = new StartClusterFailed(stackId, e);
    }
    eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Also used : Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) StartClusterSuccess(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartClusterSuccess) StartClusterFailed(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartClusterFailed)

Aggregations

Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 StartClusterFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartClusterFailed)1 StartClusterSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.StartClusterSuccess)1