public static synchronized void setSocketFactory (RMISocketFactory fac) throws IOException

Set the global socket factory from which RMI gets sockets (if the remote object is not associated with a specific client and/or server socket factory). The RMI socket factory can only be set once. Note: The RMISocketFactory may only be set if the current security manager allows setting a socket factory; if disallowed, a SecurityException will be thrown.

Parameters:
fac    the socket factory

Exceptions:
IOException    if the RMI socket factory is already set
SecurityException    if a security manager exists and its checkSetFactory method doesn't allow the operation.

See also:
getSocketFactory, java.lang.SecurityManager.checkSetFactory()

Since:  JDK1.1