Examples of HealthCheckerConfig


Examples of com.sun.appserv.management.config.HealthCheckerConfig

        Map advance = new HashMap();
        Boolean isCluster = TargetUtil.isCluster(targetName);
        handlerCtx.setOutputValue("lbConfigName", lbConfigName);
        handlerCtx.setOutputValue("isCluster", isCluster);
        handlerCtx.setOutputValue("isInstance", !isCluster);
        HealthCheckerConfig hcc = null;
        if(isCluster){
            ClusterRefConfig cref = lbConfig.getClusterRefConfigMap().get(targetName);
            advance.put("lBPolicy", ""+cref.getLBPolicy());
            String tmp = cref.getLBPolicyModule();
            advance.put("lBPolicyModule", (tmp == null) ? "" : tmp);
            hcc = cref.getHealthCheckerConfig();
        }else{
            ServerRefConfig sref = lbConfig.getServerRefConfigMap().get(targetName);
            advance.put("lbEnabled", sref.getLBEnabled());
            advance.put("enabled", sref.getEnabled());
            advance.put("disableTimeoutInMinutes", ""+sref.getDisableTimeoutInMinutes());
            hcc = sref.getHealthCheckerConfig();
        }
       
        advance.put("url", (hcc == null) ? "" : hcc.getURL());
        advance.put("intervalInSeconds", (hcc == null) ? "" : hcc.getIntervalInSeconds());
        advance.put("timeoutInSeconds", (hcc == null) ? "" : hcc.getTimeoutInSeconds());
        handlerCtx.setOutputValue("advance", advance);
    }
View Full Code Here

Examples of com.sun.appserv.management.config.HealthCheckerConfig

            LBConfig lbConfig = AMXUtil.getDomainConfig().getLBConfigMap().get(lbConfigName);
            if (lbConfig == null){
                GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("loadBalancer.noSuchLBError"));
                return;
            }
            HealthCheckerConfig hcc = null;
            HealthCheckerConfigCR ref = null;
            if(isCluster){
                ClusterRefConfig cref = lbConfig.getClusterRefConfigMap().get(targetName);
                String policy = (String) advance.get("lBPolicy");
                cref.setLBPolicy(policy);
                if ("user-defined".equals(policy))
                    cref.setLBPolicyModule( "" + advance.get("lBPolicyModule"));
                else
                    cref.setLBPolicyModule("");
                hcc = cref.getHealthCheckerConfig();
                ref = cref;
            }else{
                ServerRefConfig sref = lbConfig.getServerRefConfigMap().get(targetName);
                Boolean temp = (Boolean) advance.get("lbEnabled");
                sref.setLBEnabled( (temp == null) ? false : temp);
                sref.setDisableTimeoutInMinutes( Integer.parseInt(""+advance.get("disableTimeoutInMinutes")));
                hcc = sref.getHealthCheckerConfig();
                ref = sref;
            }
           
            String url = (String) advance.get("url");
            String intervalInSeconds = (String) advance.get("intervalInSeconds");
            String timeoutInSeconds = (String) advance.get("timeoutInSeconds");
           
            if (GuiUtil.isEmpty(url) && GuiUtil.isEmpty(intervalInSeconds) && GuiUtil.isEmpty(timeoutInSeconds))
                return;
           
            if (url == nullurl = "";
            if (intervalInSeconds == nullintervalInSeconds = "";
            if (timeoutInSeconds == nulltimeoutInSeconds = "";
           
            if (hcc != null){
                hcc.setURL(url);
                hcc.setIntervalInSeconds(intervalInSeconds);
                hcc.setTimeoutInSeconds(timeoutInSeconds);
            }else{
                ref.createHealthCheckerConfig(url, intervalInSeconds, timeoutInSeconds);
            }
       
        }catch (Exception ex){
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.