Package com.sun.appserv.management.config

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


        @HandlerOutput(name="Hosts", type=SelectItem[].class)})

        public static void getJmsHosts(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        JMSServiceConfig jConfig = config.getJMSServiceConfig();
        Map<String,JMSHostConfig>hosts = jConfig.getJMSHostConfigMap();
        String[] jHosts = (String[])hosts.keySet().toArray(new String[hosts.size()]);
        SelectItem[] options = getOptions(jHosts);
  handlerCtx.setOutputValue("Hosts", options);
    }
View Full Code Here


        @HandlerOutput(name="Properties", type=Map.class)})
       
        public static void getJmsServiceSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        JMSServiceConfig jConfig = config.getJMSServiceConfig();
        String type = jConfig.getType();
        String timeout = jConfig.getInitTimeoutInSeconds();
        String arguments = jConfig.getStartArgs();
        boolean reconnect = jConfig.getReconnectEnabled();
        String interval = jConfig.getReconnectIntervalInSeconds();
        String attempts = jConfig.getReconnectAttempts();
        String host = jConfig.getDefaultJMSHost();
        String behavior = jConfig.getAddressListBehavior();
        String iterations = jConfig.getAddressListIterations();
        String scheme = jConfig.getMQScheme();
        String service = jConfig.getMQService();
        Map<String, String> props = jConfig.getProperties();
        handlerCtx.setOutputValue("Type", type);
        handlerCtx.setOutputValue("Timeout", timeout);
        handlerCtx.setOutputValue("Arguments", arguments);
        handlerCtx.setOutputValue("Reconnect", reconnect);
        handlerCtx.setOutputValue("Interval", interval);
View Full Code Here

        @HandlerOutput(name="Service", type=String.class)})
       
        public static void getJmsServiceDefaultSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        JMSServiceConfig jConfig = config.getJMSServiceConfig();
        String type = jConfig.getDefaultValue("Type");
        String timeout = jConfig.getDefaultValue("InitTimeoutInSeconds");
        String arguments = jConfig.getDefaultValue("StartArgs");
        String reconnect = jConfig.getDefaultValue("ReconnectEnabled");
        String interval = jConfig.getDefaultValue("ReconnectIntervalInSeconds");
        String attempts = jConfig.getDefaultValue("ReconnectAttempts");
        String host = jConfig.getDefaultValue("DefaultJMSHost");
        String behavior = jConfig.getDefaultValue("AddressListBehavior");
        String iterations = jConfig.getDefaultValue("AddressListIterations");
        String scheme = jConfig.getDefaultValue("MQScheme");
        String service = jConfig.getDefaultValue("MQService");
        handlerCtx.setOutputValue("Type", type);
        handlerCtx.setOutputValue("Timeout", timeout);
        handlerCtx.setOutputValue("Arguments", arguments);
        handlerCtx.setOutputValue("Reconnect", reconnect);
        handlerCtx.setOutputValue("Interval", interval);
View Full Code Here

        @HandlerInput(name="RemoveProps", type=ArrayList.class)})
       
        public static void saveJmsServiceSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        JMSServiceConfig jConfig = config.getJMSServiceConfig();
        ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
        Map addProps = (Map)handlerCtx.getInputValue("AddProps");
        String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
        try {
            for(int i=0; i<remove.length; i++){
                jConfig.removeProperty(remove[i]);
            }
            if(addProps != null ){
                Iterator additer = addProps.keySet().iterator();
                while(additer.hasNext()){
                    Object key = additer.next();
                    String addvalue = (String)addProps.get(key);
                    jConfig.setPropertyValue((String)key, addvalue);

                }
            }             
            jConfig.setType(((String)handlerCtx.getInputValue("Type")));
            jConfig.setInitTimeoutInSeconds(((String)handlerCtx.getInputValue("Timeout")));
            jConfig.setStartArgs(((String)handlerCtx.getInputValue("Arguments")));
            jConfig.setReconnectEnabled(((Boolean)handlerCtx.getInputValue("Reconnect")).booleanValue());
            jConfig.setReconnectIntervalInSeconds(((String)handlerCtx.getInputValue("Interval")));
            jConfig.setReconnectAttempts(((String)handlerCtx.getInputValue("Attempts")));
            jConfig.setDefaultJMSHost(((String)handlerCtx.getInputValue("Host")));
            jConfig.setAddressListBehavior(((String)handlerCtx.getInputValue("Behavior")));
            jConfig.setAddressListIterations(((String)handlerCtx.getInputValue("Iterations")));
            jConfig.setMQScheme(((String)handlerCtx.getInputValue("Scheme")));
            jConfig.setMQService(((String)handlerCtx.getInputValue("Service")));
        }catch(Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
       
    }    
View Full Code Here

TOP

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

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.