use of com.sequenceiq.cloudbreak.reactor.api.event.orchestration.ChangePrimaryGatewayFailed in project cloudbreak by hortonworks.
the class ChangePrimaryGatewayHandler method accept.
@Override
public void accept(Event<ChangePrimaryGatewayRequest> event) {
ChangePrimaryGatewayRequest request = event.getData();
Selectable response;
try {
response = new ChangePrimaryGatewaySuccess(request.getStackId(), clusterServiceRunner.changePrimaryGateway(request.getStackId()));
} catch (Exception e) {
response = new ChangePrimaryGatewayFailed(request.getStackId(), e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Aggregations