Examples of HealthException


Examples of com.betfair.cougar.health.service.v3.exception.HealthException

  private RestrictedHealthStatus getHealth() throws HealthException {
    RestrictedHealthStatus currentState = RestrictedHealthStatus.OK;

        if (monitorRegistry == null) {
            logger.log(Level.SEVERE, "MonitorRegistry is null");
            throw new HealthException(ResponseCode.InternalError, HealthExceptionErrorCodeEnum.NULL);
        }
        StatusAggregator agg = monitorRegistry.getStatusAggregator();
        if (agg == null) {
            logger.log(Level.SEVERE, "StatusAggregator is null");
            throw new HealthException(ResponseCode.InternalError, HealthExceptionErrorCodeEnum.NULL);
        }
        Status status = agg.getStatus();
        if (status == null) {
            logger.log(Level.SEVERE, "Status is null");
            throw new HealthException(ResponseCode.InternalError, HealthExceptionErrorCodeEnum.NULL);
        }
        if (status.equals(Status.FAIL)) {
            currentState = RestrictedHealthStatus.FAIL;
        }
    return currentState;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.