Examples of initializeConnectionType()


Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

            String connectionTypeDescriptorClass = pluginConfig.getSimple(JMXDiscoveryComponent.CONNECTION_TYPE)
                  .getStringValue();
            PropertySimple serverUrl = pluginConfig
                  .getSimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY);

            connectionSettings.initializeConnectionType((ConnectionTypeDescriptor) Util.getInstance(connectionTypeDescriptorClass));
            // if not provided use the default serverUrl
            if (null != serverUrl) {
               connectionSettings.setServerUrl(serverUrl.getStringValue());
            }
View Full Code Here

Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

                String connectionTypeDescriptorClass = pluginConfig.getSimple(CONNECTOR_DESCRIPTOR_TYPE)
                    .getStringValue();
                PropertySimple serverUrl = pluginConfig.getSimple(CONNECTOR_ADDRESS);

                connectionSettings.initializeConnectionType((ConnectionTypeDescriptor) Class.forName(
                    connectionTypeDescriptorClass).newInstance());
                // if not provided use the default serverUrl
                if (null != serverUrl) {
                    connectionSettings.setServerUrl(serverUrl.getStringValue());
                }
View Full Code Here

Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

            String password = pluginConfig.getSimpleValue(PLUGIN_CONFIG_PASSWORD, "rhqadmin");
            String clientJarDir = pluginConfig.getSimpleValue(PLUGIN_CONFIG_CLIENT_JAR_LOCATION);

            ConnectionSettings connectionSettings = new ConnectionSettings();
            connectionSettings.setLibraryURI(clientJarDir);
            connectionSettings.initializeConnectionType(new RhqServerConnectionTypeDescriptor("jboss-client.jar"));
            connectionSettings.setServerUrl("service:jmx:remoting-jmx://" + hostname + ":" + port);
            connectionSettings.setPrincipal(username);
            connectionSettings.setCredentials(password);

            if (connectionSettings.getControlProperties() == null) {
View Full Code Here

Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

                String connectionTypeDescriptorClass = pluginConfig.getSimple(JMXDiscoveryComponent.CONNECTION_TYPE)
                    .getStringValue();
                PropertySimple serverUrl = pluginConfig
                    .getSimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY);

                connectionSettings.initializeConnectionType((ConnectionTypeDescriptor) Class.forName(
                    connectionTypeDescriptorClass).newInstance());
                // if not provided use the default serverUrl
                if (null != serverUrl) {
                    connectionSettings.setServerUrl(serverUrl.getStringValue());
                }
View Full Code Here

Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

        } catch (Exception e) {
            throw new RuntimeException("Failed to instantiate connection type descriptor of type [" + connectionTypeDescriptorClassName + "].", e);
        }

        ConnectionSettings settings = new ConnectionSettings();
        settings.initializeConnectionType(connectionTypeDescriptor);

        // Set principal and credentials.
        String principal = pluginConfig.getSimpleValue(JMXComponent.PRINCIPAL_CONFIG_PROP, null);
        settings.setPrincipal(principal);
        String credentials = pluginConfig.getSimpleValue(JMXComponent.CREDENTIALS_CONFIG_PROP, null);
View Full Code Here

Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

        EmsConnection emsConnection = null;
        try {
            File clientJarFile = new File(pluginConfig.getSimpleValue(CLIENT_JAR_LOCATION));

            ConnectionSettings connectionSettings = new ConnectionSettings();
            connectionSettings.initializeConnectionType(new A7ConnectionTypeDescriptor(clientJarFile));
            connectionSettings.setLibraryURI(clientJarFile.getParent());
            String serverUrl = "service:jmx:" //
                + pluginConfig.getSimpleValue(PROTOCOL) //
                + "://" //
                + pluginConfig.getSimpleValue(HOSTNAME) //
View Full Code Here

Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

                ConnectionSettings connectionSettings = new ConnectionSettings();

                String connectionTypeDescriptorClass = pluginConfig.getSimple(JMXDiscoveryComponent.CONNECTION_TYPE)
                    .getStringValue();
                connectionSettings.initializeConnectionType((ConnectionTypeDescriptor) Class.forName(
                    connectionTypeDescriptorClass).newInstance());
                connectionSettings.setServerUrl(pluginConfig.getSimpleValue(NAMING_URL_CONFIG_PROP, null));
                connectionSettings.setPrincipal(pluginConfig.getSimpleValue(PRINCIPAL_CONFIG_PROP, null));
                connectionSettings.setCredentials(pluginConfig.getSimpleValue(CREDENTIALS_CONFIG_PROP, null));
                connectionSettings.setLibraryURI(jbossHomeDir);
View Full Code Here

Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

            String connectionTypeDescriptorClass = pluginConfig.getSimple(JMXDiscoveryComponent.CONNECTION_TYPE)
                  .getStringValue();
            PropertySimple serverUrl = pluginConfig
                  .getSimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY);

            connectionSettings.initializeConnectionType((ConnectionTypeDescriptor) Util.getInstance(
                  connectionTypeDescriptorClass));
            // if not provided use the default serverUrl
            if (null != serverUrl) {
               connectionSettings.setServerUrl(serverUrl.getStringValue());
            }
View Full Code Here

Examples of org.mc4j.ems.connection.settings.ConnectionSettings.initializeConnectionType()

            String connectionTypeDescriptorClass = pluginConfig.getSimple(JMXDiscoveryComponent.CONNECTION_TYPE)
                  .getStringValue();
            PropertySimple serverUrl = pluginConfig
                  .getSimple(JMXDiscoveryComponent.CONNECTOR_ADDRESS_CONFIG_PROPERTY);

            connectionSettings.initializeConnectionType((ConnectionTypeDescriptor) Util.getInstance(
                  connectionTypeDescriptorClass));
            // if not provided use the default serverUrl
            if (null != serverUrl) {
               connectionSettings.setServerUrl(serverUrl.getStringValue());
            }
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.