Package java.rmi.server

Examples of java.rmi.server.RMIServerSocketFactory


                log.debug("RMI registry found at "+rmiListenAddr+":"+jndiRmiPort);
            }
            catch (RemoteException e)
            {
                log.debug("Creating RMI registry at "+rmiListenAddr+":"+jndiRmiPort);
                RMIServerSocketFactory ssf = new JMXOverRMIServerSocketFactory(10,rmiListenAddr,false);
                registry = LocateRegistry.createRegistry(jndiRmiPort,null,ssf);
            }
           
            // Create the MBean server
            mBeanServer = MBeanServerFactory.newMBeanServer(JMX_DOMAIN);
View Full Code Here


    private void handleSsl(JmxConnectorServerDriver dr, JmxConnector connector) {
        final boolean ssl = connector.isSecurityEnabled();
        if (bDebug) System.out.println(
                "DEBUG MESSAGE: SSL Status for System Jmx Connector: " + ssl);
        dr.setSsl(ssl);       
        RMIServerSocketFactory sf = null;
        if (ssl) {                         
            sf = new AdminSslServerSocketFactory(connector.getSsl(),
                                                 connector.getAddress());
            RMIClientSocketFactory cf = new AdminRMISSLClientSocketFactory();
            dr.setRmiClientSocketFactory(cf);
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

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

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

      JMXServiceURL url = createJMXConnectorServerAddress();
      Map env = getEnvironment();
      env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, client);
      env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, server);
View Full Code Here

    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

        IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();


        //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();

        if (sslEnabled)
View Full Code Here

        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();

        // load the factories
View Full Code Here

            // application is already running on the configured host/port
            // or if the rmiHost is not local
            try {
                // find the server socket factory: use the default if the
                // rmiHost is not configured
                RMIServerSocketFactory sf;
                if (rc.getRmiHost().length() > 0) {
                    log.debug("Creating RMIServerSocketFactory for host " + rc.getRmiHost());
                    InetAddress hostAddress = InetAddress.getByName(rc.getRmiHost());
                    sf = getRMIServerSocketFactory(hostAddress);
                } else {
View Full Code Here

     *         creating <code>java.net.ServerSocket</code> instances bound to
     *         the <code>rmiHost</code>.
     */
    protected RMIServerSocketFactory getRMIServerSocketFactory(
            final InetAddress hostAddress) {
        return new RMIServerSocketFactory() {
            public ServerSocket createServerSocket(int port) throws IOException {
                return new ServerSocket(port, -1, hostAddress);
            }
        };
    }
View Full Code Here

            // 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();
                ssf = new SslRMIServerSocketFactory(ciphers, protocols,
View Full Code Here

TOP

Related Classes of java.rmi.server.RMIServerSocketFactory

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.