Search in sources :

Example 1 with RMIExporter

use of com.sun.jmx.remote.internal.RMIExporter in project jdk8u_jdk by JetBrains.

the class RMIJRMPServerImpl method export.

private void export(Remote obj) throws RemoteException {
    final RMIExporter exporter = (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    final boolean daemon = EnvHelp.isServerDaemon(env);
    if (daemon && exporter != null) {
        throw new IllegalArgumentException("If " + EnvHelp.JMX_SERVER_DAEMON + " is specified as true, " + RMIExporter.EXPORTER_ATTRIBUTE + " cannot be used to specify an exporter!");
    }
    if (daemon) {
        if (csf == null && ssf == null) {
            new UnicastServerRef(port).exportObject(obj, null, true);
        } else {
            new UnicastServerRef2(port, csf, ssf).exportObject(obj, null, true);
        }
    } else if (exporter != null) {
        exporter.exportObject(obj, port, csf, ssf);
    } else {
        UnicastRemoteObject.exportObject(obj, port, csf, ssf);
    }
}
Also used : RMIExporter(com.sun.jmx.remote.internal.RMIExporter) UnicastServerRef2(sun.rmi.server.UnicastServerRef2) UnicastServerRef(sun.rmi.server.UnicastServerRef)

Aggregations

RMIExporter (com.sun.jmx.remote.internal.RMIExporter)1 UnicastServerRef (sun.rmi.server.UnicastServerRef)1 UnicastServerRef2 (sun.rmi.server.UnicastServerRef2)1