/// <summary> /// Creates and exports a new UnicastRemoteObject object using the /// particular supplied port and socket factories. /// /// <para>Either socket factory may be {@code null}, in which case /// the corresponding client or server socket creation method of /// <seealso cref="RMISocketFactory"/> is used instead. /// /// </para> /// </summary> /// <param name="port"> the port number on which the remote object receives calls /// (if <code>port</code> is zero, an anonymous port is chosen) </param> /// <param name="csf"> the client-side socket factory for making calls to the /// remote object </param> /// <param name="ssf"> the server-side socket factory for receiving remote calls </param> /// <exception cref="RemoteException"> if failed to export object /// @since 1.2 </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: protected UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException protected internal UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) { this.Port = port; this.Csf = csf; this.Ssf = ssf; ExportObject((Remote)this, port, csf, ssf); }
/// <summary> /// Exports the remote object to make it available to receive incoming /// calls, using a transport specified by the given socket factory. /// /// <para>Either socket factory may be {@code null}, in which case /// the corresponding client or server socket creation method of /// <seealso cref="RMISocketFactory"/> is used instead. /// /// </para> /// </summary> /// <param name="obj"> the remote object to be exported </param> /// <param name="port"> the port to export the object on </param> /// <param name="csf"> the client-side socket factory for making calls to the /// remote object </param> /// <param name="ssf"> the server-side socket factory for receiving remote calls </param> /// <returns> remote object stub </returns> /// <exception cref="RemoteException"> if export fails /// @since 1.2 </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public static Remote exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException public static Remote ExportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) { return(ExportObject(obj, new UnicastServerRef2(port, csf, ssf))); }
/// <summary> /// Creates and exports a <code>Registry</code> instance on the local /// host that uses custom socket factories for communication with that /// instance. The registry that is created listens for incoming /// requests on the given <code>port</code> using a /// <code>ServerSocket</code> created from the supplied /// <code>RMIServerSocketFactory</code>. /// /// <para>The <code>Registry</code> instance is exported as if /// the static {@link /// UnicastRemoteObject#exportObject(Remote,int,RMIClientSocketFactory,RMIServerSocketFactory) /// UnicastRemoteObject.exportObject} method is invoked, passing the /// <code>Registry</code> instance, the specified <code>port</code>, the /// specified <code>RMIClientSocketFactory</code>, and the specified /// <code>RMIServerSocketFactory</code> as arguments, except that the /// <code>Registry</code> instance is exported with a well-known object /// identifier, an <seealso cref="ObjID"/> instance constructed with the value /// <seealso cref="ObjID#REGISTRY_ID"/>. /// /// </para> /// </summary> /// <param name="port"> port on which the registry accepts requests </param> /// <param name="csf"> client-side <code>Socket</code> factory used to /// make connections to the registry </param> /// <param name="ssf"> server-side <code>ServerSocket</code> factory /// used to accept connections to the registry </param> /// <returns> the registry </returns> /// <exception cref="RemoteException"> if the registry could not be exported /// @since 1.2 /// </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public static Registry createRegistry(int port, java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf) throws java.rmi.RemoteException public static Registry CreateRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) { return(new RegistryImpl(port, csf, ssf)); }