Package com.sequenceiq.cloudbreak.websocket.message

Examples of com.sequenceiq.cloudbreak.websocket.message.StatusMessage


            }
        } catch (Exception ex) {
            LOGGER.error(String.format("Stack rollback failed on {} stack: ", stack.getId()), ex);
        }
        websocketService.sendToTopicUser(stack.getOwner(), WebsocketEndPoint.STACK,
                new StatusMessage(stackId, stack.getName(), Status.CREATE_FAILED.name(), detailedMessage));
        stackUpdater.updateStackStatusReason(stackId, detailedMessage);
        cloudbreakEventService.fireCloudbreakEvent(stackId, BillingStatus.BILLING_STOPPED.name(), "Stack creation failed.");
    }
View Full Code Here


        Stack oneWithLists = stackRepository.findOneWithLists(data.getStackId());
        MDCBuilder.buildMdcContext(oneWithLists);
        LOGGER.info("Accepted {} event.", ReactorConfig.DELETE_COMPLETE_EVENT);
        stackRepository.delete(oneWithLists);
        websocketService.sendToTopicUser(oneWithLists.getOwner(), WebsocketEndPoint.TERMINATE,
                new StatusMessage(oneWithLists.getId(), oneWithLists.getName(), Status.DELETE_COMPLETED.name(), String.format("Stack delete completed")));
        retryingStackUpdater.updateStackStatusReason(oneWithLists.getId(), String.format("Stack delete completed"));
    }
View Full Code Here

        clusterRepository.save(cluster);
        if (cluster.getEmailNeeded()) {
            ambariClusterInstallerMailSenderService.sendFailEmail(cluster.getOwner());
        }
        websocketService.sendToTopicUser(cluster.getOwner(), WebsocketEndPoint.CLUSTER,
                new StatusMessage(clusterId, cluster.getName(), Status.CREATE_FAILED.name(), detailedMessage));
    }
View Full Code Here

            }
            metadataRepository.save(metadataEntry);
        }
        stackUpdater.updateStackStatus(stack.getId(), Status.AVAILABLE, "");
        websocketService.sendToTopicUser(cluster.getOwner(), WebsocketEndPoint.CLUSTER,
                new StatusMessage(data.getClusterId(), cluster.getName(), Status.AVAILABLE.name()));
    }
View Full Code Here

        if (cluster.getEmailNeeded()) {
            ambariClusterInstallerMailSenderService.sendSuccessEmail(cluster.getOwner(), event.getData().getAmbariIp());
        }
        websocketService.sendToTopicUser(cluster.getOwner(), WebsocketEndPoint.CLUSTER,
                new StatusMessage(clusterId, cluster.getName(), Status.AVAILABLE.name()));
    }
View Full Code Here

        cluster.setStatus(Status.AVAILABLE);
        cluster.setStatusReason(data.getDetailedMessage());
        clusterRepository.save(cluster);
        Stack stack = stackRepository.findStackForCluster(cluster.getId());
        stackUpdater.updateStackStatus(stack.getId(), Status.AVAILABLE);
        websocketService.sendToTopicUser(cluster.getOwner(), WebsocketEndPoint.CLUSTER, new StatusMessage(data.getClusterId(), cluster.getName(),
                "UPDATE_FAILED"));
    }
View Full Code Here

        blueprint.setOwner(user.getUserId());
        blueprint.setAccount(user.getAccount());
        try {
            savedBlueprint = blueprintRepository.save(blueprint);
            websocketService.sendToTopicUser(user.getUsername(), WebsocketEndPoint.BLUEPRINT,
                    new StatusMessage(savedBlueprint.getId(), savedBlueprint.getName(), Status.AVAILABLE.name()));
        } catch (DataIntegrityViolationException ex) {
            throw new DuplicateKeyValueException(blueprint.getName(), ex);
        }
        return savedBlueprint;
    }
View Full Code Here

        }
        if (clusterRepository.findAllClusterByBlueprint(blueprint.getId()).isEmpty()) {

            blueprintRepository.delete(blueprint);
            websocketService.sendToTopicUser(blueprint.getOwner(), WebsocketEndPoint.BLUEPRINT,
                    new StatusMessage(blueprint.getId(), blueprint.getName(), Status.DELETE_COMPLETED.name()));
        } else {
            throw new BadRequestException(String.format(
                    "There are stacks associated with blueprint '%s'. Please remove these before the deleting the blueprint.", id));
        }
    }
View Full Code Here

        } catch (DataIntegrityViolationException ex) {
            throw new DuplicateKeyValueException(credential.getName(), ex);
        }
        createAzureCertificates(user, savedCredential);
        websocketService.sendToTopicUser(user.getUsername(), WebsocketEndPoint.CREDENTIAL,
                new StatusMessage(credential.getId(), credential.getName(), Status.AVAILABLE.name()));

        return savedCredential;
    }
View Full Code Here

        if (credential == null) {
            throw new NotFoundException(String.format("Credential '%s' not found.", id));
        }
        credentialRepository.delete(credential);
        websocketService.sendToTopicUser(credential.getOwner(), WebsocketEndPoint.CREDENTIAL,
                new StatusMessage(credential.getId(), credential.getName(), Status.DELETE_COMPLETED.name()));
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.websocket.message.StatusMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.