Package org.jmanage.monitoring.downtime

Examples of org.jmanage.monitoring.downtime.DowntimeRecorder


public class ApplicationViewHelper {
   
    private static final SimpleDateFormat formatter = new SimpleDateFormat("MMM dd, yyyy hh:mm aaa");

    public static boolean isApplicationUp(ApplicationConfig appConfig) {
        DowntimeRecorder recorder = ApplicationDowntimeService.getInstance().getDowntimeRecorder();
        boolean isUp = true;
        if (appConfig.isCluster()) {
            for (ApplicationConfig childAppConfig : appConfig.getApplications()) {
                if (!recorder.isApplicationUp(childAppConfig)) {
                    // once an application is detected that is down, there is no need to proceed
                    // further
                    isUp = false;
                    break;
                }
            }
        }
        else {
            isUp = recorder.isApplicationUp(appConfig);
        }
        return isUp;
    }
View Full Code Here


        }
        return isUp;
    }
   
    public static String getRecordingSince(ApplicationConfig appConfig){
        DowntimeRecorder recorder = ApplicationDowntimeService.getInstance().getDowntimeRecorder();
        ApplicationDowntimeHistory history = recorder.getDowntimeHistory(appConfig);
        return formatter.format(new Date(history.getRecordingSince()));
    }
View Full Code Here

        if (request.getParameter("width") != null)
            width = Integer.parseInt(request.getParameter("width"));
        if (request.getParameter("height") != null)
            height = Integer.parseInt(request.getParameter("height"));
       
        DowntimeRecorder recorder = ApplicationDowntimeService.getInstance().getDowntimeRecorder();
        double unavailable = recorder.getUnavailablePercentage(context.getApplicationConfig());
       
        drawImage(response.getOutputStream(), width, height, unavailable);
        return null;
    }
View Full Code Here

TOP

Related Classes of org.jmanage.monitoring.downtime.DowntimeRecorder

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.