Examples of SslRMIClientSocketFactory


Examples of javax.rmi.ssl.SslRMIClientSocketFactory

            // Provide the SSL/TLS-based RMI Client Socket Factory required
            // by the JNDI/RMI Registry Service Provider to communicate with
            // the SSL/TLS-protected RMI Registry
            //
            env.put("com.sun.jndi.rmi.factory.socket",
                    new SslRMIClientSocketFactory());

            // Create the RMI connector client and
            // connect it to the RMI connector server
            // args[0] is the server's host - localhost
            // args[1] is the secure server port - 4545
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

                           appRegistry.getConfiguration().getManagementKeyStorePassword());
                }
            }

            //create the SSL RMI socket factories
            csf = new SslRMIClientSocketFactory();
            ssf = new SslRMIServerSocketFactory();
        }
        else
        {
            //Do not specify any specific RMI socket factories, resulting in use of the defaults.
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

                final String sslProperty = "com.sun.management.jmxremote.ssl";
                String value = getConfigProperty(sslProperty);
                if (Boolean.valueOf(value).booleanValue()) {
                    if (log.isInfoEnabled())
                        log.info("Activated SSL communication");
                    SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
                    SslRMIServerSocketFactory ssf = new SslRMIServerSocketFactory();
                    env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE,csf);
                    env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE,ssf);
                }
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

            RMIClientSocketFactory csf = null;
            RMIServerSocketFactory ssf = null;

            // Configure SSL for RMI connection if required
            if (rmiSSL) {
                csf = new SslRMIClientSocketFactory();
                ssf = new SslRMIServerSocketFactory(ciphers, protocols,
                            clientAuth);
            }
           
            // Force the use of local ports if required
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

            RMIClientSocketFactory csf = null;
            RMIServerSocketFactory ssf = null;

            // Configure SSL for RMI connection if required
            if (rmiSSL) {
                csf = new SslRMIClientSocketFactory();
                ssf = new SslRMIServerSocketFactory(ciphers, protocols,
                            clientAuth);
            }
           
            // Force the use of local ports if required
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

        environment.put(JMXConnector.CREDENTIALS, credentials);
        environment.put(JMXConnectorFactory.DEFAULT_CLASS_LOADER, BaseDeploymentFactory.class.getClassLoader());
        String connectorName = "/JMXConnector";
        if (params.isSecure()) {
            connectorName = "/JMXSecureConnector";
            SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
            environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
        }   
        try {
            // if ipv6 numeric address wrap with "[" "]"
            String host = params.getHost();
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

        Map<String, Object> map = new HashMap<String, Object>();
        map.put(JMXConnector.CREDENTIALS, new String[] { user, password });
        String connectorName = "/JMXConnector";
        if (secure) {
            connectorName = "/JMXSecureConnector";
            SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
            map.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
        }
        JMXServiceURL address = new JMXServiceURL(
                "service:jmx:rmi:///jndi/rmi://" + host + ":" + port + connectorName);
        JMXConnector jmxConnector = JMXConnectorFactory.connect(address, map);
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

        environment.put(JMXConnector.CREDENTIALS, credentials);
        environment.put(JMXConnectorFactory.DEFAULT_CLASS_LOADER, BaseDeploymentFactory.class.getClassLoader());
        String connectorName = "/JMXConnector";
        if (params.isSecure()) {
            connectorName = "/JMXSecureConnector";
            SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
            environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
        }   
        try {
            // if ipv6 numeric address wrap with "[" "]"
            String host = params.getHost();
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

       
        this.url = new JMXServiceURL(url);
        this.environment = new HashMap();
        this.environment.put(JMXConnector.CREDENTIALS, new String[] {username, password});
        if (secure) {
            SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
            this.environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
        }

        log.debug("Initialized with URL: " + url + ", environment: " + environment);
    }
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory

    }

    private void setupSsl() throws GeneralSecurityException {
        SSLServerSocketFactory sslServerSocketFactory = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore, keyStoreAvailabilityTimeout);
        RMIServerSocketFactory rmiServerSocketFactory = new KarafSslRMIServerSocketFactory(sslServerSocketFactory, this.isClientAuth(), getRmiServerHost());
        RMIClientSocketFactory rmiClientSocketFactory = new SslRMIClientSocketFactory();
        environment.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rmiServerSocketFactory);
        environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rmiClientSocketFactory);
        // TODO secure RMI connector as well ?
        // environment.put("com.sun.jndi.rmi.factory.socket", rmiClientSocketFactory);
    }
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.