com.sun.jmx.remote.internal.RMIExporter Java Examples

The following examples show how to use com.sun.jmx.remote.internal.RMIExporter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RMIJRMPServerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void export(Remote obj, ObjectInputFilter typeFilter) 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 (exporter != null) {
        exporter.exportObject(obj, port, csf, ssf, typeFilter);
    } else {
        if (csf == null && ssf == null) {
            new UnicastServerRef(new LiveRef(port), typeFilter).exportObject(obj, null, daemon);
        } else {
            new UnicastServerRef2(port, csf, ssf, typeFilter).exportObject(obj, null, daemon);
        }
    }
}
 
Example #2
Source File: RMIJRMPServerImpl.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #3
Source File: RMIJRMPServerImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #4
Source File: RMIJRMPServerImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #5
Source File: RMIJRMPServerImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #6
Source File: RMIJRMPServerImpl.java    From Java8CN with Apache License 2.0 6 votes vote down vote up
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);
    }
}
 
Example #7
Source File: RMIJRMPServerImpl.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #8
Source File: RMIJRMPServerImpl.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #9
Source File: RMIJRMPServerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #10
Source File: RMIJRMPServerImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
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);
    }
}
 
Example #11
Source File: RMIJRMPServerImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #12
Source File: RMIJRMPServerImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #13
Source File: RMIJRMPServerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
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);
    }
}
 
Example #14
Source File: RMIJRMPServerImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #15
Source File: RMIJRMPServerImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
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);
    }
}
 
Example #16
Source File: RMIJRMPServerImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #17
Source File: RMIJRMPServerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #18
Source File: RMIJRMPServerImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #19
Source File: RMIJRMPServerImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #20
Source File: RMIJRMPServerImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #21
Source File: RMIJRMPServerImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #22
Source File: RMIJRMPServerImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #23
Source File: RMIJRMPServerImpl.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #24
Source File: RMIJRMPServerImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #25
Source File: RMIJRMPServerImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #26
Source File: RMIJRMPServerImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #27
Source File: RMIJRMPServerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #28
Source File: RMIJRMPServerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #29
Source File: RMIJRMPServerImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}
 
Example #30
Source File: RMIJRMPServerImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void unexport(Remote obj, boolean force)
        throws NoSuchObjectException {
    RMIExporter exporter =
        (RMIExporter) env.get(RMIExporter.EXPORTER_ATTRIBUTE);
    if (exporter == null)
        UnicastRemoteObject.unexportObject(obj, force);
    else
        exporter.unexportObject(obj, force);
}