Package com.sun.appserv.management.config

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


                String type = (String)handlerCtx.getInputValue("Type");
                SSLConfigContainer sslContainerConfig = null;
                boolean isEdit = ((Boolean)handlerCtx.getInputValue("Edit")).booleanValue();
                if(isEdit){
                    if(type.equals("jmx")){
                        JMXConnectorConfig jmxConfig = config.getAdminServiceConfig().getJMXConnectorConfigMap().get(oName);
                        sslContainerConfig = (SSLConfigContainer)jmxConfig;
                    }else if(type.equals("iiop")){
                        IIOPListenerConfig iiopConfig = config.getIIOPServiceConfig().getIIOPListenerConfigMap().get(oName);
                        sslContainerConfig = (SSLConfigContainer)iiopConfig;
                    }else if(type.equals("http")){
                        HTTPListenerConfig httpConfig = config.getHTTPServiceConfig().getHTTPListenerConfigMap().get(oName);
                        sslContainerConfig = (SSLConfigContainer)httpConfig;
                    }else if(type.equals("nodeagent")){
                        NodeAgentConfig agentConfig = AMXUtil.getDomainConfig().getNodeAgentConfigMap().get(oName);
                        JMXConnectorConfig jmxConfig = agentConfig.getJMXConnectorConfig();
                        sslContainerConfig = (SSLConfigContainer)jmxConfig;
                    }
                    if((sslContainerConfig != null) && (sslContainerConfig.getSSLConfig() != null)){
                        sslContainerConfig.removeSSLConfig();
                    }
View Full Code Here


           
            public static void getNodeAgentJmxSettings(HandlerContext handlerCtx) {
            String ndAgentName = ((String)handlerCtx.getInputValue("NodeAgentName"));
            Map <String, NodeAgentConfig> nodeAgentMap = AMXUtil.getDomainConfig().getNodeAgentConfigMap();
            NodeAgentConfig agentConfig = nodeAgentMap.get(ndAgentName);
            JMXConnectorConfig connectorConfig = agentConfig.getJMXConnectorConfig();
            handlerCtx.setOutputValue("JmxName", agentConfig.getSystemJMXConnectorName());
            handlerCtx.setOutputValue("JmxProtocol", connectorConfig.getProtocol());
            handlerCtx.setOutputValue("Address", connectorConfig.getAddress());
            handlerCtx.setOutputValue("Port", connectorConfig.getPort());
            handlerCtx.setOutputValue("RealmName", connectorConfig.getAuthRealmName());
            handlerCtx.setOutputValue("Accept", connectorConfig.getAcceptAll());
            handlerCtx.setOutputValue("security", connectorConfig.getSecurityEnabled());
            String client="";
            if (connectorConfig.existsProperty("client-hostname"))
                client = connectorConfig.getPropertyValue("client-hostname");
            handlerCtx.setOutputValue("clientHostname", client);
        }
View Full Code Here

            public static void saveNodeAgentJmxSettings(HandlerContext handlerCtx) {
            try{
                String ndAgentName = ((String)handlerCtx.getInputValue("NodeAgentName"));
                Map <String, NodeAgentConfig> nodeAgentMap = AMXUtil.getDomainConfig().getNodeAgentConfigMap();
                NodeAgentConfig agentConfig = nodeAgentMap.get(ndAgentName);
                JMXConnectorConfig connectorConfig = agentConfig.getJMXConnectorConfig();
                String objName = "com.sun.appserv:type=jmx-connector,node-agent=" + ndAgentName + ",category=config";
                JMXUtil.setAttribute(objName, new Attribute("address", handlerCtx.getInputValue("Address")));
                JMXUtil.setAttribute(objName, new Attribute("port", handlerCtx.getInputValue("Port")));
                JMXUtil.setAttribute(objName, new Attribute("auth-realm-name", handlerCtx.getInputValue("RealmName")));
                connectorConfig.setProtocol((String)handlerCtx.getInputValue("JmxProtocol"));
                connectorConfig.setAcceptAll((Boolean)handlerCtx.getInputValue("Accept"));
                connectorConfig.setSecurityEnabled((Boolean)handlerCtx.getInputValue("security"));
                String clientHostname = (String) handlerCtx.getInputValue("clientHostname");
                AMXUtil.changeProperty(connectorConfig, "client-hostname", clientHostname);
            }catch(Exception ex){
                GuiUtil.handleException(handlerCtx, ex);
            }
View Full Code Here

TOP

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

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.