Package java.rmi.server

Examples of java.rmi.server.RMIClientSocketFactory


            System.setProperty("java.rmi.server.randomIDs", "true");

            // Create the environment
            HashMap<String,Object> env = new HashMap<String,Object>();

            RMIClientSocketFactory csf = null;
            RMIServerSocketFactory ssf = null;

            // Configure SSL for RMI connection if required
            if (rmiSSL) {
                csf = new SslRMIClientSocketFactory();
View Full Code Here


            connectStub((RMIServer)rmiServer.toStub(),env);
    }

    private static RMIServerImpl newJRMPServer(Map<String, ?> env, int port)
            throws IOException {
        RMIClientSocketFactory csf = (RMIClientSocketFactory)
            env.get(RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE);
        RMIServerSocketFactory ssf = (RMIServerSocketFactory)
            env.get(RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE);
        return new RMIJRMPServerImpl(port, csf, ssf, env);
    }
View Full Code Here

    public void doStart() throws Exception {
        System.setProperty("java.rmi.server.RMIClassLoaderSpi",RMIClassLoaderSpiImpl.class.getName());
        if (System.getProperty("java.rmi.server.hostname") == null && host != null && !host.equals("0.0.0.0")) {
            System.setProperty("java.rmi.server.hostname", host);
        }
        RMIClientSocketFactory socketFactory = RMISocketFactory.getDefaultSocketFactory();
        RMIServerSocketFactory serverSocketFactory = new GeronimoRMIServerSocketFactory(host);
        registry = LocateRegistry.createRegistry(port, socketFactory, serverSocketFactory);
        log.debug("Started RMI Registry on port: {}", port);
    }
View Full Code Here

/*     */     {
/* 109 */       clientConnectHost = bindHost;
/*     */     }
/*     */
/* 112 */     RMIServerSocketFactory ssf = new RemotingRMIServerSocketFactory(getServerSocketFactory(), 200, bindHost, getTimeout());
/* 113 */     RMIClientSocketFactory csf = getRMIClientSocketFactory(clientConnectHost);
/* 114 */     this.stub = UnicastRemoteObject.exportObject(this, bindPort, csf, ssf);
/*     */
/* 116 */     log.debug("Binding registry to remoting/RMIServerInvoker/" + bindPort);
/* 117 */     registry.rebind("remoting/RMIServerInvoker/" + bindPort, this);
/*     */
View Full Code Here

            log.warn("Starting unauthenticating JMXConnector for " + jmxServiceURL);
        }
       
        SSLServerSocketFactory sssf = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore, classLoader);
        RMIServerSocketFactory rssf = new GeronimoSslRMIServerSocketFactory(sssf, host, clientAuth);
        RMIClientSocketFactory rcsf = new SslRMIClientSocketFactory();
        env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rssf);
        env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rcsf);
       
        server = JMXConnectorServerFactory.newJMXConnectorServer(jmxServiceURL, env, mbeanServer);
        NotificationFilterSupport filter = new NotificationFilterSupport();
View Full Code Here

      {
         clientConnectHost = bindHost;
      }

      RMIServerSocketFactory ssf = new RemotingRMIServerSocketFactory(getServerSocketFactory(), BACKLOG_DEFAULT, bindHost, getTimeout());
      RMIClientSocketFactory csf = getRMIClientSocketFactory(clientConnectHost);
      stub = UnicastRemoteObject.exportObject(this, bindPort, csf, ssf);

      log.debug("Binding registry to " + "remoting/RMIServerInvoker/" + bindPort);
      registry.rebind("remoting/RMIServerInvoker/" + bindPort, this);
View Full Code Here

        String ksPass = ContainerConfig.getPropertyValue(cfg, "ssl-keystore-pass", null);
        String ksAlias = ContainerConfig.getPropertyValue(cfg, "ssl-keystore-alias", null);
        boolean clientAuth = ContainerConfig.getPropertyValue(cfg, "ssl-client-auth", false);

        // setup the factories
        RMIClientSocketFactory csf = null;
        RMIServerSocketFactory ssf = null;

        // get the classloader
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
View Full Code Here

    private void setupSsl() throws GeneralSecurityException {

        SSLServerSocketFactory sssf = keystoreManager.createSSLServerFactory(null, secureProtocol, algorithm, keyStore, keyAlias, trustStore,keyStoreAvailabilityTimeout);
        RMIServerSocketFactory rssf = new KarafSslRMIServerSocketFactory(sssf, this.isClientAuth(), getRmiServerHost());
        RMIClientSocketFactory rcsf = new SslRMIClientSocketFactory();
        environment.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, rssf);
        environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, rcsf);
        //@TODO secure RMI connector as well?
        //env.put("com.sun.jndi.rmi.factory.socket", rcsf);
    }
View Full Code Here

            System.setProperty("java.rmi.server.randomIDs", "true");

            // Create the environment
            HashMap<String,Object> env = new HashMap<>();

            RMIClientSocketFactory csf = null;
            RMIServerSocketFactory ssf = null;

            // Configure SSL for RMI connection if required
            if (rmiSSL) {
                if (rmiBindAddress != null) {
View Full Code Here

TOP

Related Classes of java.rmi.server.RMIClientSocketFactory

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.