Package com.sun.appserv.management.config

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


        @HandlerOutput(name="StoreHealthCheck",         type=Boolean.class),
        @HandlerOutput(name="HAStoreHealthCheck",       type=String.class)})
       
        public static void getDefaultAvailabilityServiceSettings(HandlerContext handlerCtx) {
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        AvailabilityServiceConfig availConfig = config.getAvailabilityServiceConfig();
        boolean availEnabled = Boolean.valueOf(availConfig.getDefaultValue("AvailabilityEnabled")).booleanValue();
        String storePoolName = availConfig.getDefaultValue("StorePoolName");
        String haStoreName = availConfig.getDefaultValue("HAStoreName");
        String haAgentHosts = availConfig.getDefaultValue("HAAgentHosts");
        String haAgentPort = availConfig.getDefaultValue("HAAgentPort");
        String haAgentPwd = availConfig.getDefaultValue("HAAgentPassword");
        boolean autoMgStore = Boolean.valueOf(availConfig.getDefaultValue("AutoManageHAStore")).booleanValue();
        boolean storeHealthChk = Boolean.valueOf(availConfig.getDefaultValue("HAStoreHealthcheckEnabled")).booleanValue();
        String haStoreHealthChk = availConfig.getDefaultValue("HAStoreHealthcheckIntervalSeconds");
        handlerCtx.setOutputValue("AvailabilityEnabled", availEnabled);
        handlerCtx.setOutputValue("StorePoolName", storePoolName);
        handlerCtx.setOutputValue("HAStoreName", haStoreName);
        handlerCtx.setOutputValue("HAAgentHosts", haAgentHosts);
        handlerCtx.setOutputValue("HAAgentPort", haAgentPort);     
View Full Code Here


        @HandlerOutput(name="HAStoreHealthCheck",       type=String.class),
        @HandlerOutput(name="Properties",               type=Map.class)})
       
        public static void getAvailabilityServiceSettings(HandlerContext handlerCtx) {
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        AvailabilityServiceConfig availConfig = config.getAvailabilityServiceConfig();
        boolean availEnabled = availConfig.getAvailabilityEnabled();
        String storePoolName = availConfig.getStorePoolName();
        String haStoreName = availConfig.getHAStoreName();
        String haAgentHosts = availConfig.getHAAgentHosts();
        String haAgentPort = availConfig.getHAAgentPort();
        String haAgentPwd = availConfig.getHAAgentPassword();
        boolean autoMgStore = availConfig.getAutoManageHAStore();
        boolean storeHealthChk = availConfig.getHAStoreHealthcheckEnabled();
        String haStoreHealthChk = availConfig.getHAStoreHealthcheckIntervalSeconds();
        Map<String, String> props = availConfig.getProperties();
        handlerCtx.setOutputValue("AvailabilityEnabled", availEnabled);
        handlerCtx.setOutputValue("StorePoolName", storePoolName);
        handlerCtx.setOutputValue("HAStoreName", haStoreName);
        handlerCtx.setOutputValue("HAAgentHosts", haAgentHosts);
        handlerCtx.setOutputValue("HAAgentPort", haAgentPort);     
View Full Code Here

        @HandlerInput(name="RemoveProps",              type=ArrayList.class)})
       
        public static void saveAvailabilityServiceSettings(HandlerContext handlerCtx) {
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            AvailabilityServiceConfig availConfig = config.getAvailabilityServiceConfig();
            availConfig.setAvailabilityEnabled(((Boolean)handlerCtx.getInputValue("AvailabilityEnabled")).booleanValue());
            availConfig.setStorePoolName(((String)handlerCtx.getInputValue("StorePoolName")));
            availConfig.setHAStoreName(((String)handlerCtx.getInputValue("HAStoreName")));
            availConfig.setHAAgentHosts(((String)handlerCtx.getInputValue("HAAgentHosts")));
            availConfig.setHAAgentPort(((String)handlerCtx.getInputValue("HAAgentPort")));
            availConfig.setHAAgentPassword(((String)handlerCtx.getInputValue("HAAgentPassword")));
            availConfig.setAutoManageHAStore(((Boolean)handlerCtx.getInputValue("AutoManage")).booleanValue());
            availConfig.setHAStoreHealthcheckEnabled(((Boolean)handlerCtx.getInputValue("StoreHealthCheck")).booleanValue());
            availConfig.setHAStoreHealthcheckIntervalSeconds(((String)handlerCtx.getInputValue("HAStoreHealthCheck")));
            AMXUtil.editProperties(handlerCtx, availConfig);
        }catch(Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
    }
View Full Code Here

TOP

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

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.