Examples of AFUNIXNaming


Examples of org.newsclub.net.unix.rmi.AFUNIXNaming

        }
        if (!this.socketDirectory.isDirectory()) {
            throw new IllegalStateException("socketDirectory must be an existing directory");
        }

        AFUNIXNaming naming = AFUNIXNaming.getInstance(this.socketDirectory);
        logger.debug("Socket directory: " + naming.getSocketFactory().getSocketDir());

        this.rmiRegistry = naming.getRegistry();
    }
View Full Code Here

Examples of org.newsclub.net.unix.rmi.AFUNIXNaming

        if (this.bindings == null || this.bindings.isEmpty()) {
            throw new IllegalStateException("at least one binding must be specified");
        }

        final AFUNIXNaming naming = AFUNIXNaming.getInstance(this.socketDirectory);
        logger.debug("Socket directory: " + naming.getSocketFactory().getSocketDir());

        // this trick allows repeated initializations within the same JVM. (like during test runs)
        Registry registry;
        try {
            registry = naming.createRegistry();
        } catch (RemoteException e) {
            registry = naming.getRegistry();
        }

        final StringBuilder logMessage = new StringBuilder();
        logMessage.append("Nimbus remoting server listening on domain socket: \"").
                append(this.socketDirectory.getAbsolutePath()).append("\". Bindings:");

        boolean first = true;
        for (final String bindingName : bindings.keySet()) {
            final Remote obj = bindings.get(bindingName);
            if (obj == null) {
                throw new IllegalStateException("Binding object "+ bindingName + "' is null");
            }

            logger.debug("Binding " + obj.toString() + " to name '"+ bindingName + "'");

            final Remote remote = UnicastRemoteObject.exportObject(obj, 0,
                naming.getSocketFactory(), naming.getSocketFactory());
            try {
                registry.bind(bindingName, remote);
            } catch (AlreadyBoundException e) {
                logger.warn("RMI binding '" + bindingName + "' is already bound. Proceeding.");
            }
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.