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);
}
}
Aggregations