Search in sources :

Example 1 with UploadUpscaleRecipesRequest

use of com.sequenceiq.cloudbreak.reactor.api.event.recipe.UploadUpscaleRecipesRequest in project cloudbreak by hortonworks.

the class UploadUpscaleRecipesHandler method accept.

@Override
public void accept(Event<UploadUpscaleRecipesRequest> event) {
    UploadUpscaleRecipesRequest request = event.getData();
    UploadUpscaleRecipesResult result;
    try {
        // TODO: because of CB-17116 - step removed - cleanup the code
        result = new UploadUpscaleRecipesResult(request);
    } catch (Exception e) {
        result = new UploadUpscaleRecipesResult(e.getMessage(), e, request);
    }
    eventBus.notify(result.selector(), new Event<>(event.getHeaders(), result));
}
Also used : UploadUpscaleRecipesRequest(com.sequenceiq.cloudbreak.reactor.api.event.recipe.UploadUpscaleRecipesRequest) UploadUpscaleRecipesResult(com.sequenceiq.cloudbreak.reactor.api.event.recipe.UploadUpscaleRecipesResult)

Aggregations

UploadUpscaleRecipesRequest (com.sequenceiq.cloudbreak.reactor.api.event.recipe.UploadUpscaleRecipesRequest)1 UploadUpscaleRecipesResult (com.sequenceiq.cloudbreak.reactor.api.event.recipe.UploadUpscaleRecipesResult)1