Search in sources :

Example 1 with ValidateClusterLicenceSuccess

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

the class ValidateClusterLicenceHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<ValidateClusterLicenceRequest> event) {
    Long stackId = event.getData().getResourceId();
    Selectable response;
    try {
        clusterBuilderService.validateLicence(stackId);
        response = new ValidateClusterLicenceSuccess(stackId);
    } catch (RuntimeException e) {
        LOGGER.error("ValidateClusterLicenceHandler step failed with the following message: {}", e.getMessage());
        response = new ValidateClusterLicenceFailed(stackId, e);
    }
    return response;
}
Also used : Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) ValidateClusterLicenceSuccess(com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.ValidateClusterLicenceSuccess) ValidateClusterLicenceFailed(com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.ValidateClusterLicenceFailed)

Aggregations

Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 ValidateClusterLicenceFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.ValidateClusterLicenceFailed)1 ValidateClusterLicenceSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.ValidateClusterLicenceSuccess)1