Package com.sun.appserv.management.config

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


            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){
            GuiUtil.handleException(handlerCtx, ex);
        }
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.HealthCheckerConfigCR

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.