aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/rmi/server/RMISocketFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/rmi/server/RMISocketFactory.java')
-rw-r--r--libjava/java/rmi/server/RMISocketFactory.java98
1 files changed, 60 insertions, 38 deletions
diff --git a/libjava/java/rmi/server/RMISocketFactory.java b/libjava/java/rmi/server/RMISocketFactory.java
index 95ff750..544b125 100644
--- a/libjava/java/rmi/server/RMISocketFactory.java
+++ b/libjava/java/rmi/server/RMISocketFactory.java
@@ -43,42 +43,64 @@ import java.io.IOException;
import gnu.java.rmi.server.RMIDefaultSocketFactory;
public abstract class RMISocketFactory
- implements RMIClientSocketFactory, RMIServerSocketFactory {
-
-static private RMISocketFactory defaultFactory;
-static private RMISocketFactory currentFactory;
-static private RMIFailureHandler currentHandler;
-
-static {
- defaultFactory = new RMIDefaultSocketFactory();
- currentFactory = defaultFactory;
-}
-
-public RMISocketFactory() {
-}
-
-public abstract Socket createSocket(String host, int port) throws IOException;
-
-public abstract ServerSocket createServerSocket(int port) throws IOException;
-
-public static void setSocketFactory(RMISocketFactory fac) throws IOException {
- currentFactory = fac;
-}
-
-public static RMISocketFactory getSocketFactory() {
- return (currentFactory);
-}
-
-public static RMISocketFactory getDefaultSocketFactory() {
- return (defaultFactory);
-}
-
-public static void setFailureHandler(RMIFailureHandler fh) {
- currentHandler = fh;
-}
-
-public static RMIFailureHandler getFailureHandler() {
- return (currentHandler);
-}
-
+ implements RMIClientSocketFactory, RMIServerSocketFactory
+{
+ static private RMISocketFactory defaultFactory;
+ static private RMISocketFactory currentFactory;
+ static private RMIFailureHandler currentHandler;
+
+ static
+ {
+ defaultFactory = new RMIDefaultSocketFactory();
+ currentFactory = defaultFactory;
+ }
+
+ public RMISocketFactory ()
+ {
+ }
+
+ /**
+ * @exception IOException If an error occurs
+ */
+ public abstract Socket createSocket (String host, int port)
+ throws IOException;
+
+ /**
+ * @exception IOException If an error occurs
+ */
+ public abstract ServerSocket createServerSocket (int port)
+ throws IOException;
+
+ /**
+ * @exception IOException If an error occurs
+ * @exception SecurityException FIXME
+ */
+ public static void setSocketFactory (RMISocketFactory fac)
+ throws IOException
+ {
+ currentFactory = fac;
+ }
+
+ public static RMISocketFactory getSocketFactory ()
+ {
+ return currentFactory;
+ }
+
+ public static RMISocketFactory getDefaultSocketFactory ()
+ {
+ return defaultFactory;
+ }
+
+ /**
+ * @exception SecurityException FIXME
+ */
+ public static void setFailureHandler (RMIFailureHandler fh)
+ {
+ currentHandler = fh;
+ }
+
+ public static RMIFailureHandler getFailureHandler ()
+ {
+ return currentHandler;
+ }
}