sun.rmi.server.UnicastServerRef2 Java Examples

The following examples show how to use sun.rmi.server.UnicastServerRef2. 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 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 #2
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 #3
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 #4
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 #5
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 #6
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 #7
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 #8
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 #9
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 #10
Source File: RMIJRMPServerImpl.java    From openjdk-jdk9 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 #11
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 #12
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 #13
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 #14
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 #15
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 #16
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 #17
Source File: UnicastRemoteObject.java    From jdk8u60 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #18
Source File: UnicastRemoteObject.java    From jdk1.8-source-analysis with Apache License 2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #19
Source File: UnicastRemoteObject.java    From jdk8u-dev-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #20
Source File: UnicastRemoteObject.java    From jdk-1.7-annotated with Apache License 2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #21
Source File: UnicastRemoteObject.java    From dragonwell8_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #22
Source File: UnicastRemoteObject.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #23
Source File: UnicastRemoteObject.java    From jdk8u_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #24
Source File: UnicastRemoteObject.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #25
Source File: UnicastRemoteObject.java    From openjdk-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #26
Source File: UnicastRemoteObject.java    From openjdk-8-source with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #27
Source File: UnicastRemoteObject.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #28
Source File: UnicastRemoteObject.java    From Java8CN with Apache License 2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #29
Source File: UnicastRemoteObject.java    From JDKSourceCode1.8 with MIT License 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}
 
Example #30
Source File: UnicastRemoteObject.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Exports the remote object to make it available to receive incoming
 * calls, using a transport specified by the given socket factory.
 *
 * <p>Either socket factory may be {@code null}, in which case
 * the corresponding client or server socket creation method of
 * {@link RMISocketFactory} is used instead.
 *
 * @param obj the remote object to be exported
 * @param port the port to export the object on
 * @param csf the client-side socket factory for making calls to the
 * remote object
 * @param ssf the server-side socket factory for receiving remote calls
 * @return remote object stub
 * @exception RemoteException if export fails
 * @since 1.2
 */
public static Remote exportObject(Remote obj, int port,
                                  RMIClientSocketFactory csf,
                                  RMIServerSocketFactory ssf)
    throws RemoteException
{

    return exportObject(obj, new UnicastServerRef2(port, csf, ssf));
}