Package org.rhq.enterprise.communications

Examples of org.rhq.enterprise.communications.ServiceContainerConfiguration


                    .valueOf(bindPort));
            }
        } catch (Exception e) {
            LOG.error(ServerI18NResourceKeys.ERROR_SETTING_CONNECTOR_COMM_PREFS, e);

            ServiceContainerConfiguration scConfig = new ServiceContainerConfiguration(config.getPreferences());
            preferences_node.put(ServiceContainerConfigurationConstants.CONNECTOR_BIND_ADDRESS, scConfig
                .getConnectorBindAddress());
            preferences_node.put(ServiceContainerConfigurationConstants.CONNECTOR_BIND_PORT, String.valueOf(scConfig
                .getConnectorBindPort()));
        } finally {
            try {
                preferences_node.flush();
            } catch (Exception e) {
View Full Code Here


     * server-side communications preferences.
     *
     * @return server-side communications preferences
     */
    public ServiceContainerConfiguration getServiceContainerPreferences() {
        return new ServiceContainerConfiguration(m_preferences);
    }
View Full Code Here

     * server-side communications preferences as configured by the agent.
     *
     * @return server-side communications preferences
     */
    public ServiceContainerConfiguration getServiceContainerPreferences() {
        return new ServiceContainerConfiguration(m_preferences);
    }
View Full Code Here

                        } else {
                            String token = getAgentSecurityToken();
                            ClientRemotePojoFactory pojo_factory = sender.getClientRemotePojoFactory();
                            CoreServerService remote_pojo = pojo_factory.getRemotePojo(CoreServerService.class);
                            AgentConfiguration agent_config = getConfiguration();
                            ServiceContainerConfiguration server_config = agent_config.getServiceContainerPreferences();
                            String agent_name = agent_config.getAgentName();
                            String address = server_config.getConnectorBindAddress();
                            int port = server_config.getConnectorBindPort();
                            String remote_endpoint = server_config.getConnectorRemoteEndpoint();
                            AgentVersion agentVersion = getAgentVersion();
                            String installId = System.getProperty(AgentRegistrationRequest.SYSPROP_INSTALL_ID);
                            String installLocation = getAgentHomeDirectory();
                            if (installLocation != null && installLocation.trim().length() == 0) {
                                installLocation = null; // tells the server we don't know it
View Full Code Here

     *
     * @throws Exception
     */
    private void prepareAutoDiscoveryListener() throws Exception {
        if (m_configuration.isServerAutoDetectionEnabled()) {
            ServiceContainerConfiguration comm_config = new ServiceContainerConfiguration(
                m_configuration.getPreferences());
            if (comm_config.isMulticastDetectorEnabled()) {
                m_autoDiscoveryListener = new AgentAutoDiscoveryListener(this, createServerRemoteCommunicator(null,
                    false, false));
                m_commServices.addDiscoveryListener(m_autoDiscoveryListener);
                LOG.debug(AgentI18NResourceKeys.SERVER_AUTO_DETECT_ENABLED, m_configuration.getServerLocatorUri());
            } else {
View Full Code Here

        }

        // JBoss/Remoting wants to write a jboss.identity file to the filesystem.
        // Let's tell our communication services where to put that file if this property isn't set yet.
        Preferences preferencesNode = agent_configuration.getPreferences();
        ServiceContainerConfiguration service_container_configuration = new ServiceContainerConfiguration(
            preferencesNode);
        if (service_container_configuration.getDataDirectoryIfDefined() == null) {
            String data_dir = agent_configuration.getDataDirectory().toString();
            preferencesNode.put(ServiceContainerConfigurationConstants.DATA_DIRECTORY, data_dir);
        }

        prefs.flush();
View Full Code Here

        if (!keystore_file1.exists()) {
            keystore_file1.getParentFile().mkdirs();
            m_agent1Test.createAgent(false);
            AgentConfiguration agent_config1 = m_agent1Test.getAgent().getConfiguration();
            ServiceContainerConfiguration server_config1 = agent_config1.getServiceContainerPreferences();

            SecurityUtil.createKeyStore(server_config1.getConnectorSecurityKeystoreFile(), server_config1
                .getConnectorSecurityKeystoreAlias(), "CN=RHQ, OU=RedHat, O=redhat.com, C=US", server_config1
                .getConnectorSecurityKeystorePassword(), server_config1.getConnectorSecurityKeystoreKeyPassword(),
                "DSA", 36500);
        }

        File keystore_file2 = new File("target/testdata2/keystore.dat");
        if (!keystore_file2.exists()) {
            keystore_file2.getParentFile().mkdirs();
            m_agent2Test.createAgent(false);
            AgentConfiguration agent_config2 = m_agent2Test.getAgent().getConfiguration();
            ServiceContainerConfiguration server_config2 = agent_config2.getServiceContainerPreferences();

            SecurityUtil.createKeyStore(server_config2.getConnectorSecurityKeystoreFile(), server_config2
                .getConnectorSecurityKeystoreAlias(), "CN=RHQ, OU=RedHat, O=redhat.com, C=US", server_config2
                .getConnectorSecurityKeystorePassword(), server_config2.getConnectorSecurityKeystoreKeyPassword(),
                "DSA", 36500);
        }
    }
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.communications.ServiceContainerConfiguration

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.