Package hu.u_szeged.nbo.server.threads

Source Code of hu.u_szeged.nbo.server.threads.SSLRMIRegistry

package hu.u_szeged.nbo.server.threads;

import hu.u_szeged.nbo.server.NBOServer;

import java.rmi.registry.LocateRegistry;

import javax.rmi.ssl.SslRMIClientSocketFactory;
import javax.rmi.ssl.SslRMIServerSocketFactory;

public class SSLRMIRegistry extends Thread {
    public void run() {
      try {
       
        // Start RMI registry on port 43000
        LocateRegistry.createRegistry(43000,
            new SslRMIClientSocketFactory(),
            new SslRMIServerSocketFactory(null, null, true));
       
        NBOServer.log("RMI REGISTRY running on port 43000", 1);
       
        NBOServer.setSslRmiRegistryIsAlive(true);
       
        //Sleep forever
        Thread.sleep(Long.MAX_VALUE);
       
      } catch (Exception e) {
        NBOServer.log("EXCEPTION while creating RMI registry! Terminating.\n", 2);
        e.printStackTrace();     
       
        System.exit(0);
      }
    }
}
TOP

Related Classes of hu.u_szeged.nbo.server.threads.SSLRMIRegistry

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.