<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.rmi.server.RMISocketFactory
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.rmi.server.html">This Package</a>  <a href="java.rmi.server.RMIClassLoader.html#_top_">Previous</a>  <a href="java.rmi.server.RemoteObject.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.rmi.server.RMISocketFactory
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.rmi.server.RMISocketFactory
</pre>
<hr>
<dl>
  <dt> public abstract class <b>RMISocketFactory</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
</dl>
The RMISocketFactory is used by the RMI runtime in order to obtain
 client and server sockets for RMI calls. The default implementation
 of the socket factory performs a three-tiered approach to creating
 client sockets. First, a direct socket connection to the remote VM
 is attempted.  If that fails (due to a firewall), the runtime uses
 HTTP with the explicit port number of the server.  If the firewall
 does not allow this type of communication, then HTTP to a cgi-bin
 script on the server is used to POST the RMI call.
 An application may set the source of sockets for RMI. In this case,
 the application is responsible for offering up sockets that will
 penetrate a firewall.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#RMISocketFactory()"><b>RMISocketFactory</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#createServerSocket(int)"><b>createServerSocket</b></a>(int)
  <dd>  Create a server socket on the specified port (port 0 represents
 an anonymous port).
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#createSocket(java.lang.String, int)"><b>createSocket</b></a>(String, int)
  <dd>  Create a client socket connected to the specified host and port.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFailureHandler()"><b>getFailureHandler</b></a>()
  <dd>  Returns the handler for socket creation failure.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getSocketFactory()"><b>getSocketFactory</b></a>()
  <dd>  Returns the socket factory used by RMI.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setFailureHandler(java.rmi.server.RMIFailureHandler)"><b>setFailureHandler</b></a>(RMIFailureHandler)
  <dd>  Set the failure handler to be called by the RMI runtime if
 socket creation fails.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setSocketFactory(java.rmi.server.RMISocketFactory)"><b>setSocketFactory</b></a>(RMISocketFactory)
  <dd>  Set the socket factory from which RMI gets sockets.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="RMISocketFactory"></a>
<a name="RMISocketFactory()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>RMISocketFactory</b>
<pre>
 public RMISocketFactory()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="createSocket(java.lang.String, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="createSocket"><b>createSocket</b></a>
<pre>
 public abstract <a href="java.net.Socket.html#_top_">Socket</a> createSocket(<a href="java.lang.String.html#_top_">String</a> host,
                                     int port) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Create a client socket connected to the specified host and port.
<p>
</dl>
<a name="createServerSocket(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="createServerSocket"><b>createServerSocket</b></a>
<pre>
 public abstract <a href="java.net.ServerSocket.html#_top_">ServerSocket</a> createServerSocket(int port) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Create a server socket on the specified port (port 0 represents
 an anonymous port).
<p>
</dl>
<a name="setSocketFactory(java.rmi.server.RMISocketFactory)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setSocketFactory"><b>setSocketFactory</b></a>
<pre>
 public static void setSocketFactory(<a href="#_top_">RMISocketFactory</a> fac) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Set the socket factory from which RMI gets sockets. 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.
<p>
</dl>
<a name="getSocketFactory()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getSocketFactory"><b>getSocketFactory</b></a>
<pre>
 public static <a href="#_top_">RMISocketFactory</a> getSocketFactory()
</pre>
<dl>
  <dd> Returns the socket factory used by RMI.
<p>
</dl>
<a name="setFailureHandler(java.rmi.server.RMIFailureHandler)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setFailureHandler"><b>setFailureHandler</b></a>
<pre>
 public static void setFailureHandler(<a href="java.rmi.server.RMIFailureHandler.html#_top_">RMIFailureHandler</a> fh)
</pre>
<dl>
  <dd> Set the failure handler to be called by the RMI runtime if
 socket creation fails.  The default implementation of this
 handler returns false (thus recreation of sockets is not
 attempted by the runtime).
<p>
</dl>
<a name="getFailureHandler()"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFailureHandler"><b>getFailureHandler</b></a>
<pre>
 public static <a href="java.rmi.server.RMIFailureHandler.html#_top_">RMIFailureHandler</a> getFailureHandler()
</pre>
<dl>
  <dd> Returns the handler for socket creation failure.
<p>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.rmi.server.html">This Package</a>  <a href="java.rmi.server.RMIClassLoader.html#_top_">Previous</a>  <a href="java.rmi.server.RemoteObject.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
