use of com.sequenceiq.cloudbreak.reactor.api.event.stack.userdata.CreateUserDataSuccess in project cloudbreak by hortonworks.
the class CreateUserDataHandler method accept.
@Override
public void accept(Event<CreateUserDataRequest> event) {
StackEvent request = event.getData();
Selectable response;
try {
idBrokerService.generateIdBrokerSignKey(request.getResourceId());
userDataService.createUserData(request.getResourceId());
response = new CreateUserDataSuccess(request.getResourceId());
} catch (Exception e) {
LOGGER.error("Creating user data has failed", e);
response = new CreateUserDataFailed(request.getResourceId(), e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
Aggregations