Package java.rmi.server

Examples of java.rmi.server.RMIClientSocketFactory


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

    private static RMIServerImpl newJRMPServer(Map 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


        // Check RMIClientSocketFactory in stub is from the expected class
        // "javax.rmi.ssl.SslRMIClientSocketFactory".
        //
        LiveRef liveRef = ((UnicastRef2)ref).getLiveRef();
        RMIClientSocketFactory csf = liveRef.getClientSocketFactory();
        if (csf == null || csf.getClass() != SslRMIClientSocketFactory.class)
            throw new SecurityException(
                  "Expecting a " + SslRMIClientSocketFactory.class.getName() +
                  " RMI client socket factory in stub!");
    }
View Full Code Here

    }
   
    private RMIClientSocketFactory factory() {
        if (factory != null)
            return factory;
        RMIClientSocketFactory f = RMISocketFactory.getSocketFactory();
        if (f != null)
            return f;
        return RMISocketFactory.getDefaultSocketFactory();
    }
View Full Code Here

        final JMXConnectorServer cs;
        HashMap<String,Object> env = new HashMap<String,Object>();

        //Socket factories for the RMIConnectorServer, either default or SLL depending on configuration
        RMIClientSocketFactory csf;
        RMIServerSocketFactory ssf;

        //check ssl enabled option in config, default to true if option is not set
        boolean sslEnabled = appRegistry.getConfiguration().getManagementSSLEnabled();
View Full Code Here

        return ( cs );
    }
   
    public JMXConnectorServer startJconsoleConnectorServer() throws IOException {
        // This env is ditto with the System JMX Connector Server, except SSL ClientSocketFactory.
        final RMIClientSocketFactory cf = new SslRMIClientSocketFactory();
        final Map jconsoleenv = new HashMap(env);
        if (ssl)
            jconsoleenv.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, cf);
         JMXServiceURL newjconsoleurl = this.jconsoleurl;
   String tuserport = "0";
View Full Code Here

        dr.setSsl(ssl);       
        RMIServerSocketFactory sf = null;
        if (ssl) {                         
            sf = new AdminSslServerSocketFactory(connector.getSsl(),
                                                 connector.getAddress());
            RMIClientSocketFactory cf = new AdminRMISSLClientSocketFactory();
            dr.setRmiClientSocketFactory(cf);
        } else sf = new RMIMultiHomedServerSocketFactory(connector.getAddress());
        dr.setRmiServerSocketFactory(sf);
    }
View Full Code Here

   }

   protected RMIServerImpl createRMIServer(JMXServiceURL url, Map environment) throws IOException
   {
      int port = url.getPort();
      RMIClientSocketFactory clientFactory = (RMIClientSocketFactory)environment.get(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE);
      RMIServerSocketFactory serverFactory = (RMIServerSocketFactory)environment.get(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE);
      return new RMIJRMPServerImpl(port, clientFactory, serverFactory, environment);
   }
View Full Code Here

      return env;
   }

   public void testRMIConnectorWithCustomSocketFactories() throws Exception
   {
      RMIClientSocketFactory client = new RMICSF();

      final MutableBoolean serverCheck = new MutableBoolean(false);
      RMIServerSocketFactory server = new RMISSF(serverCheck);

      JMXServiceURL url = createJMXConnectorServerAddress();
View Full Code Here

        // Check RMIClientSocketFactory in stub is from the expected class
        // "javax.rmi.ssl.SslRMIClientSocketFactory".
        //
        LiveRef liveRef = ((UnicastRef2)ref).getLiveRef();
        RMIClientSocketFactory csf = liveRef.getClientSocketFactory();
        if (csf == null || csf.getClass() != SslRMIClientSocketFactory.class)
            throw new SecurityException(
                    "Expecting a " + SslRMIClientSocketFactory.class.getName() +
                    " RMI client socket factory in stub!");
    }
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

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.