aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/rmi/AccessException.java43
-rw-r--r--libjava/java/rmi/AlreadyBoundException.java41
-rw-r--r--libjava/java/rmi/ConnectException.java42
-rw-r--r--libjava/java/rmi/ConnectIOException.java42
-rw-r--r--libjava/java/rmi/MarshalException.java42
-rw-r--r--libjava/java/rmi/MarshalledObject.java51
-rw-r--r--libjava/java/rmi/Naming.java70
-rw-r--r--libjava/java/rmi/NoSuchObjectException.java39
-rw-r--r--libjava/java/rmi/NotBoundException.java43
-rw-r--r--libjava/java/rmi/RMISecurityException.java43
-rw-r--r--libjava/java/rmi/RMISecurityManager.java139
-rw-r--r--libjava/java/rmi/Remote.java31
-rw-r--r--libjava/java/rmi/RemoteException.java85
-rw-r--r--libjava/java/rmi/ServerError.java37
-rw-r--r--libjava/java/rmi/ServerException.java43
-rw-r--r--libjava/java/rmi/ServerRuntimeException.java37
-rw-r--r--libjava/java/rmi/StubNotFoundException.java41
-rw-r--r--libjava/java/rmi/UnexpectedException.java41
-rw-r--r--libjava/java/rmi/UnknownHostException.java41
-rw-r--r--libjava/java/rmi/UnmarshalException.java43
-rw-r--r--libjava/java/rmi/activation/Activatable.java93
-rw-r--r--libjava/java/rmi/activation/ActivateFailedException.java43
-rw-r--r--libjava/java/rmi/activation/ActivationDesc.java102
-rw-r--r--libjava/java/rmi/activation/ActivationException.java78
-rw-r--r--libjava/java/rmi/activation/ActivationGroup.java73
-rw-r--r--libjava/java/rmi/activation/ActivationGroupDesc.java120
-rw-r--r--libjava/java/rmi/activation/ActivationGroupID.java59
-rw-r--r--libjava/java/rmi/activation/ActivationID.java61
-rw-r--r--libjava/java/rmi/activation/ActivationInstantiator.java39
-rw-r--r--libjava/java/rmi/activation/ActivationMonitor.java41
-rw-r--r--libjava/java/rmi/activation/ActivationSystem.java49
-rw-r--r--libjava/java/rmi/activation/Activator.java39
-rw-r--r--libjava/java/rmi/activation/UnknownGroupException.java37
-rw-r--r--libjava/java/rmi/activation/UnknownObjectException.java37
-rw-r--r--libjava/java/rmi/dgc/DGC.java41
-rw-r--r--libjava/java/rmi/dgc/Lease.java58
-rw-r--r--libjava/java/rmi/dgc/VMID.java106
-rw-r--r--libjava/java/rmi/registry/LocateRegistry.java75
-rw-r--r--libjava/java/rmi/registry/Registry.java51
-rw-r--r--libjava/java/rmi/registry/RegistryHandler.java39
-rw-r--r--libjava/java/rmi/server/ExportException.java43
-rw-r--r--libjava/java/rmi/server/LoaderHandler.java44
-rw-r--r--libjava/java/rmi/server/LogStream.java92
-rw-r--r--libjava/java/rmi/server/ObjID.java95
-rw-r--r--libjava/java/rmi/server/Operation.java46
-rw-r--r--libjava/java/rmi/server/RMIClassLoader.java92
-rw-r--r--libjava/java/rmi/server/RMIClientSocketFactory.java37
-rw-r--r--libjava/java/rmi/server/RMIFailureHandler.java34
-rw-r--r--libjava/java/rmi/server/RMIServerSocketFactory.java37
-rw-r--r--libjava/java/rmi/server/RMISocketFactory.java74
-rw-r--r--libjava/java/rmi/server/RemoteCall.java46
-rw-r--r--libjava/java/rmi/server/RemoteObject.java119
-rw-r--r--libjava/java/rmi/server/RemoteRef.java51
-rw-r--r--libjava/java/rmi/server/RemoteServer.java56
-rw-r--r--libjava/java/rmi/server/RemoteStub.java47
-rw-r--r--libjava/java/rmi/server/ServerCloneException.java76
-rw-r--r--libjava/java/rmi/server/ServerNotActiveException.java43
-rw-r--r--libjava/java/rmi/server/ServerRef.java43
-rw-r--r--libjava/java/rmi/server/Skeleton.java39
-rw-r--r--libjava/java/rmi/server/SkeletonMismatchException.java41
-rw-r--r--libjava/java/rmi/server/SkeletonNotFoundException.java43
-rw-r--r--libjava/java/rmi/server/SocketSecurityException.java43
-rw-r--r--libjava/java/rmi/server/UID.java120
-rw-r--r--libjava/java/rmi/server/UnicastRemoteObject.java76
-rw-r--r--libjava/java/rmi/server/Unreferenced.java34
65 files changed, 3706 insertions, 0 deletions
diff --git a/libjava/java/rmi/AccessException.java b/libjava/java/rmi/AccessException.java
new file mode 100644
index 0000000..91d66b2
--- /dev/null
+++ b/libjava/java/rmi/AccessException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class AccessException
+ extends RemoteException {
+
+public static final long serialVersionUID = 6314925228044966088l;
+
+public AccessException(String s) {
+ super(s);
+}
+
+public AccessException(String s, Exception e) {
+ super (s, e);
+}
+
+}
diff --git a/libjava/java/rmi/AlreadyBoundException.java b/libjava/java/rmi/AlreadyBoundException.java
new file mode 100644
index 0000000..ef0c166
--- /dev/null
+++ b/libjava/java/rmi/AlreadyBoundException.java
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class AlreadyBoundException
+ extends Exception {
+
+public AlreadyBoundException() {
+ super();
+}
+
+public AlreadyBoundException(String s) {
+ super (s);
+}
+
+}
diff --git a/libjava/java/rmi/ConnectException.java b/libjava/java/rmi/ConnectException.java
new file mode 100644
index 0000000..e55a274
--- /dev/null
+++ b/libjava/java/rmi/ConnectException.java
@@ -0,0 +1,42 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class ConnectException
+ extends RemoteException {
+
+
+public ConnectException(String s) {
+ super(s);
+}
+
+public ConnectException(String s, Exception e) {
+ super (s, e);
+}
+
+}
diff --git a/libjava/java/rmi/ConnectIOException.java b/libjava/java/rmi/ConnectIOException.java
new file mode 100644
index 0000000..bb7e298
--- /dev/null
+++ b/libjava/java/rmi/ConnectIOException.java
@@ -0,0 +1,42 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class ConnectIOException
+ extends RemoteException {
+
+
+public ConnectIOException(String s) {
+ super(s);
+}
+
+public ConnectIOException(String s, Exception e) {
+ super (s, e);
+}
+
+}
diff --git a/libjava/java/rmi/MarshalException.java b/libjava/java/rmi/MarshalException.java
new file mode 100644
index 0000000..988ec47
--- /dev/null
+++ b/libjava/java/rmi/MarshalException.java
@@ -0,0 +1,42 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class MarshalException
+ extends RemoteException {
+
+
+public MarshalException(String s) {
+ super(s);
+}
+
+public MarshalException(String s, Exception e) {
+ super (s, e);
+}
+
+}
diff --git a/libjava/java/rmi/MarshalledObject.java b/libjava/java/rmi/MarshalledObject.java
new file mode 100644
index 0000000..87e6963
--- /dev/null
+++ b/libjava/java/rmi/MarshalledObject.java
@@ -0,0 +1,51 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+import java.io.Serializable;
+
+public final class MarshalledObject
+ extends Object implements Serializable {
+
+public MarshalledObject(Object obj) {
+ throw new Error("Not implemented");
+}
+
+public boolean equals(Object obj) {
+ throw new Error("Not implemented");
+}
+
+public Object get() {
+ throw new Error("Not implemented");
+}
+
+public int hashCode() {
+ throw new Error("Not implemented");
+}
+
+}
diff --git a/libjava/java/rmi/Naming.java b/libjava/java/rmi/Naming.java
new file mode 100644
index 0000000..7646477
--- /dev/null
+++ b/libjava/java/rmi/Naming.java
@@ -0,0 +1,70 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.registry.Registry;
+import java.rmi.registry.LocateRegistry;
+
+public final class Naming {
+
+public static Remote lookup(String name) throws NotBoundException, MalformedURLException, RemoteException {
+ URL u = new URL("http:" + name);
+ return (getRegistry(u).lookup(u.getFile().substring(1)));
+}
+
+public static void bind(String name, Remote obj) throws AlreadyBoundException, MalformedURLException, RemoteException {
+ URL u = new URL("http:" + name);
+ getRegistry(u).bind(u.getFile().substring(1), obj);
+}
+
+public static void unbind(String name) throws RemoteException, NotBoundException, MalformedURLException {
+ URL u = new URL("http:" + name);
+ getRegistry(u).unbind(u.getFile().substring(1));
+}
+
+public static void rebind(String name, Remote obj) throws RemoteException, MalformedURLException {
+ URL u = new URL("http:" + name);
+ getRegistry(u).rebind(u.getFile().substring(1), obj);
+}
+
+public static String[] list(String name) throws RemoteException, MalformedURLException {
+ return (getRegistry(new URL("http:" + name)).list());
+}
+
+private static Registry getRegistry(URL u) throws RemoteException {
+ if (u.getPort() == -1) {
+ return (LocateRegistry.getRegistry(u.getHost()));
+ }
+ else {
+ return (LocateRegistry.getRegistry(u.getHost(), u.getPort()));
+ }
+}
+
+}
diff --git a/libjava/java/rmi/NoSuchObjectException.java b/libjava/java/rmi/NoSuchObjectException.java
new file mode 100644
index 0000000..7608fd9
--- /dev/null
+++ b/libjava/java/rmi/NoSuchObjectException.java
@@ -0,0 +1,39 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class NoSuchObjectException
+ extends RemoteException {
+
+public static final long serialVersionUID = 6619395951570472985L;
+
+public NoSuchObjectException(String s) {
+ super(s);
+}
+
+}
diff --git a/libjava/java/rmi/NotBoundException.java b/libjava/java/rmi/NotBoundException.java
new file mode 100644
index 0000000..f28ee6a
--- /dev/null
+++ b/libjava/java/rmi/NotBoundException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class NotBoundException
+ extends Exception {
+
+public static final long serialVersionUID = -1857741824849069317l;
+
+public NotBoundException() {
+ super();
+}
+
+public NotBoundException(String s) {
+ super (s);
+}
+
+}
diff --git a/libjava/java/rmi/RMISecurityException.java b/libjava/java/rmi/RMISecurityException.java
new file mode 100644
index 0000000..cbfbed2
--- /dev/null
+++ b/libjava/java/rmi/RMISecurityException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+import java.lang.SecurityException;
+
+public class RMISecurityException
+ extends SecurityException {
+
+public RMISecurityException(String n) {
+ super(n);
+}
+
+public RMISecurityException(String n, String a) {
+ super(n);
+}
+
+}
diff --git a/libjava/java/rmi/RMISecurityManager.java b/libjava/java/rmi/RMISecurityManager.java
new file mode 100644
index 0000000..d63d969
--- /dev/null
+++ b/libjava/java/rmi/RMISecurityManager.java
@@ -0,0 +1,139 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+import java.io.FileDescriptor;
+import java.lang.Thread;
+import java.lang.Class;
+import java.lang.SecurityManager;
+import java.net.InetAddress;
+import java.security.Permission;
+
+public class RMISecurityManager extends SecurityManager {
+
+public RMISecurityManager() {
+}
+
+public void checkAccept(String host, int port) {
+}
+
+public void checkAccess(Thread g) {
+}
+
+public void checkAccess(ThreadGroup g) {
+}
+
+public void checkAwtEventQueueAccess() {
+}
+
+public void checkConnect(String host, int port) {
+}
+
+public void checkConnect(String host, int port, Object context) {
+}
+
+public void checkCreateClassLoader() {
+}
+
+public void checkDelete(String file) {
+}
+
+public void checkExec(String cmd) {
+}
+
+public void checkExit(int status) {
+}
+
+public void checkLink(String lib) {
+}
+
+public void checkListen(int port) {
+}
+
+public void checkMemberAccess ( Class clazz, int which ) {
+}
+
+public void checkMulticast(InetAddress maddr) {
+}
+
+public void checkMulticast(InetAddress maddr, byte ttl) {
+}
+
+public void checkPackageAccess(String pkg) {
+}
+
+public void checkPackageDefinition(String pkg) {
+}
+
+public void checkPermission(Permission perm) {
+}
+
+public void checkPermission(Permission perm, Object context) {
+}
+
+public void checkPrintJobAccess() {
+}
+
+public void checkPropertiesAccess() {
+}
+
+public void checkPropertyAccess(String key) {
+}
+
+/* public void checkPropertyAccess(String key, String def) {
+}*/
+
+public void checkRead(FileDescriptor fd) {
+}
+
+public void checkRead(String file) {
+}
+
+public void checkRead(String file, Object context) {
+}
+
+public void checkSecurityAccess(String action) {
+}
+
+public void checkSetFactory() {
+}
+
+public void checkSystemClipboardAccess() {
+}
+
+public boolean checkTopLevelWindow(Object window) {
+ return (true);
+}
+
+public void checkWrite(FileDescriptor fd) {
+}
+
+public void checkWrite(String file) {
+}
+
+}
diff --git a/libjava/java/rmi/Remote.java b/libjava/java/rmi/Remote.java
new file mode 100644
index 0000000..f9aab0b
--- /dev/null
+++ b/libjava/java/rmi/Remote.java
@@ -0,0 +1,31 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public interface Remote {
+}
diff --git a/libjava/java/rmi/RemoteException.java b/libjava/java/rmi/RemoteException.java
new file mode 100644
index 0000000..5127a5a
--- /dev/null
+++ b/libjava/java/rmi/RemoteException.java
@@ -0,0 +1,85 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+import java.lang.Throwable;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+
+public class RemoteException
+ extends IOException {
+
+public static final long serialVersionUID = -5148567311918794206l;
+
+public Throwable detail;
+
+public RemoteException() {
+ super();
+ detail = null;
+}
+
+public RemoteException(String s) {
+ super(s);
+ detail = null;
+}
+
+public RemoteException(String s, Throwable e) {
+ super(s);
+ detail = e;
+}
+
+public String getMessage() {
+ if (detail == null) {
+ return (super.getMessage());
+ }
+ else {
+ return (super.getMessage() + "; nested exception is: " + detail.getMessage());
+ }
+}
+
+public void printStackTrace(PrintStream s) {
+ if (detail != null) {
+ detail.printStackTrace(s);
+ }
+ super.printStackTrace(s);
+}
+
+public void printStackTrace(PrintWriter s) {
+ if (detail != null) {
+ detail.printStackTrace(s);
+ }
+ super.printStackTrace(s);
+}
+
+public void printStackTrace() {
+ printStackTrace(System.err);
+}
+
+}
diff --git a/libjava/java/rmi/ServerError.java b/libjava/java/rmi/ServerError.java
new file mode 100644
index 0000000..71e2d06
--- /dev/null
+++ b/libjava/java/rmi/ServerError.java
@@ -0,0 +1,37 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class ServerError
+ extends RemoteException {
+
+public ServerError(String s, Error e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/ServerException.java b/libjava/java/rmi/ServerException.java
new file mode 100644
index 0000000..f7ec303
--- /dev/null
+++ b/libjava/java/rmi/ServerException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class ServerException
+ extends RemoteException {
+
+public static final long serialVersionUID = -4775845313121906682l;
+
+public ServerException(String s) {
+ super(s);
+}
+
+public ServerException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/ServerRuntimeException.java b/libjava/java/rmi/ServerRuntimeException.java
new file mode 100644
index 0000000..9f76f61
--- /dev/null
+++ b/libjava/java/rmi/ServerRuntimeException.java
@@ -0,0 +1,37 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class ServerRuntimeException
+ extends RemoteException {
+
+public ServerRuntimeException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/StubNotFoundException.java b/libjava/java/rmi/StubNotFoundException.java
new file mode 100644
index 0000000..c6d70cf
--- /dev/null
+++ b/libjava/java/rmi/StubNotFoundException.java
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class StubNotFoundException
+ extends RemoteException {
+
+public StubNotFoundException(String s) {
+ super(s);
+}
+
+public StubNotFoundException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/UnexpectedException.java b/libjava/java/rmi/UnexpectedException.java
new file mode 100644
index 0000000..b65d661
--- /dev/null
+++ b/libjava/java/rmi/UnexpectedException.java
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class UnexpectedException
+ extends RemoteException {
+
+public UnexpectedException(String s) {
+ super(s);
+}
+
+public UnexpectedException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/UnknownHostException.java b/libjava/java/rmi/UnknownHostException.java
new file mode 100644
index 0000000..06263b2
--- /dev/null
+++ b/libjava/java/rmi/UnknownHostException.java
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class UnknownHostException
+ extends RemoteException {
+
+public UnknownHostException(String s) {
+ super(s);
+}
+
+public UnknownHostException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/UnmarshalException.java b/libjava/java/rmi/UnmarshalException.java
new file mode 100644
index 0000000..68adfdf
--- /dev/null
+++ b/libjava/java/rmi/UnmarshalException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi;
+
+public class UnmarshalException
+ extends RemoteException {
+
+public static final long serialVersionUID = 594380845140740218l;
+
+public UnmarshalException(String s) {
+ super(s);
+}
+
+public UnmarshalException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/activation/Activatable.java b/libjava/java/rmi/activation/Activatable.java
new file mode 100644
index 0000000..a3e712f
--- /dev/null
+++ b/libjava/java/rmi/activation/Activatable.java
@@ -0,0 +1,93 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.rmi.server.RemoteServer;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.RemoteException;
+import java.rmi.Remote;
+import java.rmi.NoSuchObjectException;
+import java.rmi.MarshalledObject;
+
+public abstract class Activatable
+ extends RemoteServer {
+
+protected Activatable(String location, MarshalledObject data, boolean restart, int port) throws ActivationException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+protected Activatable(String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws ActivationException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+protected Activatable(ActivationID id, int port) throws RemoteException {
+ throw new Error("Not implemented");
+}
+
+protected Activatable(ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
+ throw new Error("Not implemented");
+}
+
+protected ActivationID getID() {
+ throw new Error("Not implemented");
+}
+
+public static Remote register(ActivationDesc desc) throws UnknownGroupException, ActivationException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+public static boolean inactive(ActivationID id) throws UnknownObjectException, ActivationException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+public static void unregister(ActivationID id) throws UnknownObjectException, ActivationException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+public static ActivationID exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port) throws ActivationException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+public static ActivationID exportObject(Remote obj, String location, MarshalledObject data, boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws ActivationException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+public static Remote exportObject(Remote obj, ActivationID id, int port) throws RemoteException {
+ throw new Error("Not implemented");
+}
+
+public static Remote exportObject(Remote obj, ActivationID id, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
+ throw new Error("Not implemented");
+}
+
+public static boolean unexportObject(Remote obj, boolean force) throws NoSuchObjectException {
+ throw new Error("Not implemented");
+}
+
+}
diff --git a/libjava/java/rmi/activation/ActivateFailedException.java b/libjava/java/rmi/activation/ActivateFailedException.java
new file mode 100644
index 0000000..0352817
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivateFailedException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.rmi.RemoteException;
+
+public class ActivateFailedException
+ extends RemoteException {
+
+public ActivateFailedException(String s) {
+ super(s);
+}
+
+public ActivateFailedException(String s, Exception ex) {
+ super(s, ex);
+}
+
+}
diff --git a/libjava/java/rmi/activation/ActivationDesc.java b/libjava/java/rmi/activation/ActivationDesc.java
new file mode 100644
index 0000000..192fb5c
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationDesc.java
@@ -0,0 +1,102 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.io.Serializable;
+import java.rmi.MarshalledObject;
+
+public final class ActivationDesc
+ implements Serializable {
+
+private ActivationGroupID groupid;
+private String classname;
+private String location;
+private MarshalledObject data;
+private boolean restart;
+
+public ActivationDesc(String className, String location, MarshalledObject data) throws ActivationException {
+ this(ActivationGroup.currentGroupID(), className, location, data, false);
+}
+
+public ActivationDesc(String className, String location, MarshalledObject data, boolean restart) throws ActivationException {
+ this(ActivationGroup.currentGroupID(), className, location, data, restart);
+}
+
+public ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data) {
+ this(groupID, className, location, data, false);
+}
+
+public ActivationDesc(ActivationGroupID groupID, String className, String location, MarshalledObject data, boolean restart) {
+ this.groupid = groupID;
+ this.classname = className;
+ this.location = location;
+ this.data = data;
+ this.restart = restart;
+}
+
+public ActivationGroupID getGroupID() {
+ return (groupid);
+}
+
+public String getClassName() {
+ return (classname);
+}
+
+public String getLocation() {
+ return (location);
+}
+
+public MarshalledObject getData() {
+ return (data);
+}
+
+public boolean getRestartMode() {
+ return (restart);
+}
+
+public boolean equals(Object obj) {
+ if (!(obj instanceof ActivationDesc)) {
+ return (false);
+ }
+ ActivationDesc that = (ActivationDesc)obj;
+
+ if (this.groupid.equals(that.groupid) &&
+ this.classname.equals(that.classname) &&
+ this.location.equals(that.location) &&
+ this.data.equals(that.data) &&
+ this.restart == that.restart) {
+ return (true);
+ }
+ return (false);
+}
+
+public int hashCode() {
+ return (groupid.hashCode() ^ classname.hashCode() ^ location.hashCode() ^ data.hashCode());
+}
+
+}
diff --git a/libjava/java/rmi/activation/ActivationException.java b/libjava/java/rmi/activation/ActivationException.java
new file mode 100644
index 0000000..d72e1a6
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationException.java
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+public class ActivationException
+ extends Exception {
+
+public Throwable detail;
+
+public ActivationException() {
+ super();
+}
+
+public ActivationException(String s) {
+ super(s);
+}
+
+public ActivationException(String s, Throwable ex) {
+ super(s);
+ detail = ex;
+}
+
+public String getMessage() {
+ if (detail == null) {
+ return (super.getMessage());
+ }
+ else {
+ return (super.getMessage() + ":" + detail.getMessage());
+ }
+}
+
+public void printStackTrace(PrintStream s) {
+ if (detail != null) {
+ detail.printStackTrace(s);
+ }
+ super.printStackTrace(s);
+}
+
+public void printStackTrace() {
+ printStackTrace(System.err);
+}
+
+public void printStackTrace(PrintWriter s) {
+ if (detail != null) {
+ detail.printStackTrace(s);
+ }
+ super.printStackTrace(s);
+}
+
+}
diff --git a/libjava/java/rmi/activation/ActivationGroup.java b/libjava/java/rmi/activation/ActivationGroup.java
new file mode 100644
index 0000000..40316c0
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationGroup.java
@@ -0,0 +1,73 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.rmi.server.UnicastRemoteObject;
+import java.rmi.RemoteException;
+import java.rmi.Remote;
+import java.rmi.MarshalledObject;
+
+public abstract class ActivationGroup
+ extends UnicastRemoteObject
+ implements ActivationInstantiator {
+
+protected ActivationGroup(ActivationGroupID groupID) throws RemoteException {
+ throw new Error("Not implemented");
+}
+
+public boolean inactiveObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+public abstract void activeObject(ActivationID id, Remote obj) throws ActivationException, UnknownObjectException, RemoteException;
+
+public static ActivationGroup createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation) throws ActivationException {
+ throw new Error("Not implemented");
+}
+
+public static ActivationGroupID currentGroupID() {
+ throw new Error("Not implemented");
+}
+
+public static void setSystem(ActivationSystem system) throws ActivationException {
+ throw new Error("Not implemented");
+}
+
+public static ActivationSystem getSystem() throws ActivationException {
+ throw new Error("Not implemented");
+}
+
+protected void activeObject(ActivationID id, MarshalledObject mobj) throws ActivationException, UnknownObjectException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+protected void inactiveGroup() throws UnknownGroupException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+}
diff --git a/libjava/java/rmi/activation/ActivationGroupDesc.java b/libjava/java/rmi/activation/ActivationGroupDesc.java
new file mode 100644
index 0000000..1dd90e6
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationGroupDesc.java
@@ -0,0 +1,120 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.io.Serializable;
+import java.util.Properties;
+import java.rmi.MarshalledObject;
+
+public final class ActivationGroupDesc
+ implements Serializable {
+
+public static class CommandEnvironment
+ implements Serializable {
+
+private String cmdpath;
+private String[] argv;
+
+public CommandEnvironment(String cmdpath, String[] argv) {
+ this.cmdpath = cmdpath;
+ this.argv = argv;
+}
+
+public String getCommandPath() {
+ return (cmdpath);
+}
+
+public String[] getCommandOptions() {
+ return (argv);
+}
+
+public boolean equals(Object obj) {
+ if (!(obj instanceof CommandEnvironment)) {
+ return (false);
+ }
+ CommandEnvironment that = (CommandEnvironment)obj;
+
+ if (!this.cmdpath.equals(that.cmdpath)) {
+ return (false);
+ }
+
+ int len = this.argv.length;
+ if (len != that.argv.length) {
+ return (false);
+ }
+ for (int i = 0; i < len; i++) {
+ if (!this.argv[i].equals(that.argv[i])) {
+ return (false);
+ }
+ }
+ return (true);
+}
+
+public int hashCode() {
+ return (cmdpath.hashCode()); // Not a very good hash code.
+}
+
+}
+
+public ActivationGroupDesc(Properties overrides, ActivationGroupDesc.CommandEnvironment cmd) {
+ throw new Error("Not implemented");
+}
+
+public ActivationGroupDesc(String className, String location, MarshalledObject data, Properties overrides, ActivationGroupDesc.CommandEnvironment cmd) {
+ throw new Error("Not implemented");
+}
+
+public String getClassName() {
+ throw new Error("Not implemented");
+}
+
+public String getLocation() {
+ throw new Error("Not implemented");
+}
+
+public MarshalledObject getData() {
+ throw new Error("Not implemented");
+}
+
+public Properties getPropertyOverrides() {
+ throw new Error("Not implemented");
+}
+
+public ActivationGroupDesc.CommandEnvironment getCommandEnvironment() {
+ throw new Error("Not implemented");
+}
+
+public boolean equals(Object obj) {
+ throw new Error("Not implemented");
+}
+
+public int hashCode() {
+ throw new Error("Not implemented");
+}
+
+}
diff --git a/libjava/java/rmi/activation/ActivationGroupID.java b/libjava/java/rmi/activation/ActivationGroupID.java
new file mode 100644
index 0000000..e0e5592
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationGroupID.java
@@ -0,0 +1,59 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.io.Serializable;
+
+public class ActivationGroupID
+ implements Serializable {
+
+private ActivationSystem system;
+
+public ActivationGroupID(ActivationSystem system) {
+ this.system = system;
+}
+
+public ActivationSystem getSystem() {
+ return (system);
+}
+
+public int hashCode() {
+ return (system.hashCode());
+}
+
+public boolean equals(Object obj) {
+ if (obj instanceof ActivationGroupID) {
+ ActivationGroupID that = (ActivationGroupID)obj;
+ if (this.system.equals(that.system)) {
+ return (true);
+ }
+ }
+ return (false);
+}
+
+}
diff --git a/libjava/java/rmi/activation/ActivationID.java b/libjava/java/rmi/activation/ActivationID.java
new file mode 100644
index 0000000..750f6cb
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationID.java
@@ -0,0 +1,61 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.io.Serializable;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public class ActivationID
+ implements Serializable {
+
+private Activator activator;
+
+public ActivationID(Activator activator) {
+ this.activator = activator;
+}
+
+public Remote activate(boolean force) throws ActivationException, UnknownObjectException, RemoteException {
+ throw new Error("Not implemented");
+}
+
+public int hashCode() {
+ return (activator.hashCode());
+}
+
+public boolean equals(Object obj) {
+ if (obj instanceof ActivationID) {
+ ActivationID that = (ActivationID)obj;
+ if (this.activator.equals(that.activator)) {
+ return (true);
+ }
+ }
+ return (false);
+}
+
+}
diff --git a/libjava/java/rmi/activation/ActivationInstantiator.java b/libjava/java/rmi/activation/ActivationInstantiator.java
new file mode 100644
index 0000000..71cd799
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationInstantiator.java
@@ -0,0 +1,39 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.MarshalledObject;
+
+public interface ActivationInstantiator
+ extends Remote {
+
+public MarshalledObject newInstance(ActivationID id, ActivationDesc desc) throws ActivationException, RemoteException;
+
+}
diff --git a/libjava/java/rmi/activation/ActivationMonitor.java b/libjava/java/rmi/activation/ActivationMonitor.java
new file mode 100644
index 0000000..21d269a
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationMonitor.java
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.MarshalledObject;
+
+public interface ActivationMonitor
+ extends Remote {
+
+public void inactiveObject(ActivationID id) throws UnknownObjectException, RemoteException;
+public void activeObject(ActivationID id, MarshalledObject obj) throws UnknownObjectException, RemoteException;
+public void inactiveGroup(ActivationGroupID id, long incarnation) throws UnknownGroupException, RemoteException;
+
+}
diff --git a/libjava/java/rmi/activation/ActivationSystem.java b/libjava/java/rmi/activation/ActivationSystem.java
new file mode 100644
index 0000000..c937da4
--- /dev/null
+++ b/libjava/java/rmi/activation/ActivationSystem.java
@@ -0,0 +1,49 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface ActivationSystem
+ extends Remote {
+
+public static final int SYSTEM_PORT = 0; // XXX
+
+public ActivationID registerObject(ActivationDesc desc) throws ActivationException, UnknownGroupException, RemoteException;
+public void unregisterObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException;
+public ActivationGroupID registerGroup(ActivationGroupDesc desc) throws ActivationException, RemoteException;
+public ActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws UnknownGroupException, ActivationException, RemoteException;
+public void unregisterGroup(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException;
+public void shutdown() throws RemoteException;
+public ActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc) throws ActivationException, UnknownObjectException, UnknownGroupException, RemoteException;
+public ActivationGroupDesc setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) throws ActivationException, UnknownGroupException, RemoteException;
+public ActivationDesc getActivationDesc(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException;
+public ActivationGroupDesc getActivationGroupDesc(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteException;
+
+}
diff --git a/libjava/java/rmi/activation/Activator.java b/libjava/java/rmi/activation/Activator.java
new file mode 100644
index 0000000..82dbc60
--- /dev/null
+++ b/libjava/java/rmi/activation/Activator.java
@@ -0,0 +1,39 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.MarshalledObject;
+
+public interface Activator
+ extends Remote {
+
+public MarshalledObject activate(ActivationID id, boolean force) throws ActivationException, UnknownObjectException, RemoteException;
+
+}
diff --git a/libjava/java/rmi/activation/UnknownGroupException.java b/libjava/java/rmi/activation/UnknownGroupException.java
new file mode 100644
index 0000000..655f2c6
--- /dev/null
+++ b/libjava/java/rmi/activation/UnknownGroupException.java
@@ -0,0 +1,37 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+public class UnknownGroupException
+ extends ActivationException {
+
+public UnknownGroupException(String s) {
+ super(s);
+}
+
+}
diff --git a/libjava/java/rmi/activation/UnknownObjectException.java b/libjava/java/rmi/activation/UnknownObjectException.java
new file mode 100644
index 0000000..b28bfaa
--- /dev/null
+++ b/libjava/java/rmi/activation/UnknownObjectException.java
@@ -0,0 +1,37 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.activation;
+
+public class UnknownObjectException
+ extends ActivationException {
+
+public UnknownObjectException(String s) {
+ super(s);
+}
+
+}
diff --git a/libjava/java/rmi/dgc/DGC.java b/libjava/java/rmi/dgc/DGC.java
new file mode 100644
index 0000000..3fd1bb6
--- /dev/null
+++ b/libjava/java/rmi/dgc/DGC.java
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.dgc;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.server.ObjID;
+
+public interface DGC
+ extends Remote {
+
+public Lease dirty(ObjID[] ids, long sequenceNum, Lease lease) throws RemoteException;
+
+public void clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong) throws RemoteException;
+
+}
diff --git a/libjava/java/rmi/dgc/Lease.java b/libjava/java/rmi/dgc/Lease.java
new file mode 100644
index 0000000..98dfb2df
--- /dev/null
+++ b/libjava/java/rmi/dgc/Lease.java
@@ -0,0 +1,58 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.dgc;
+
+import java.io.Serializable;
+import java.rmi.dgc.VMID;
+
+public final class Lease
+ implements Serializable {
+
+static final long serialVersionUID = -5713411624328831948L;
+
+private VMID vmid;
+private long value;
+
+public Lease(VMID id, long duration) {
+ vmid = id;
+ value = duration;
+}
+
+public VMID getVMID() {
+ return (vmid);
+}
+
+public long getValue() {
+ return (value);
+}
+
+public String toString() {
+ return ("[" + vmid.toString() + ", " + Long.toString(value) + "]");
+}
+
+}
diff --git a/libjava/java/rmi/dgc/VMID.java b/libjava/java/rmi/dgc/VMID.java
new file mode 100644
index 0000000..d264752e
--- /dev/null
+++ b/libjava/java/rmi/dgc/VMID.java
@@ -0,0 +1,106 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.dgc;
+
+import java.io.Serializable;
+import java.rmi.server.UID;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public final class VMID
+ implements Serializable {
+
+static final long serialVersionUID = -538642295484486218L;
+static final boolean areWeUnique;
+static byte[] localAddr;
+
+private byte[] addr;
+private UID uid;
+
+static {
+ byte[] addr;
+ boolean awu = true;
+ try {
+ addr = InetAddress.getLocalHost().getAddress();
+ if (addr[0] == 127 && addr[1] == 0 && addr[2] == 0 && addr[3] == 1) {
+ awu = false;
+ }
+ }
+ catch (UnknownHostException _) {
+ addr = new byte[]{ 127, 0, 0, 1 };
+ awu = false;
+ }
+ localAddr = addr;
+ areWeUnique = awu;
+}
+
+public VMID() {
+ addr = localAddr;
+ uid = new UID();
+}
+
+public static boolean isUnique() {
+ return (areWeUnique);
+}
+
+public int hashCode() {
+ return (super.hashCode());
+}
+
+public boolean equals(Object obj) {
+ if (!(obj instanceof VMID)) {
+ return (false);
+ }
+ VMID other = (VMID)obj;
+ if (addr.length != other.addr.length) {
+ return (false);
+ }
+ for (int i = addr.length - 1; i >= 0; i--) {
+ if (addr[i] != other.addr[i]) {
+ return (false);
+ }
+ }
+ return (uid.equals(other.uid));
+}
+
+public String toString() {
+ StringBuffer buf = new StringBuffer("[VMID: ");
+ for (int i = 0; i < addr.length; i++) {
+ if (i > 0) {
+ buf.append(".");
+ }
+ buf.append(Integer.toString(addr[i]));
+ }
+ buf.append(" ");
+ buf.append(uid.toString());
+ buf.append("]");
+
+ return (buf.toString());
+}
+
+}
diff --git a/libjava/java/rmi/registry/LocateRegistry.java b/libjava/java/rmi/registry/LocateRegistry.java
new file mode 100644
index 0000000..269049d
--- /dev/null
+++ b/libjava/java/rmi/registry/LocateRegistry.java
@@ -0,0 +1,75 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.registry;
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.RMISocketFactory;
+import java.rmi.server.RemoteRef;
+import java.rmi.server.ObjID;
+import java.net.Socket;
+
+import gnu.java.rmi.server.UnicastRef;
+import gnu.java.rmi.server.UnicastServerRef;
+import gnu.java.rmi.registry.RegistryImpl;
+import gnu.java.rmi.registry.RegistryImpl_Stub;
+
+public final class LocateRegistry {
+
+public static Registry getRegistry() throws RemoteException {
+ return (getRegistry("localhost", Registry.REGISTRY_PORT));
+}
+
+public static Registry getRegistry(int port) throws RemoteException {
+ return (getRegistry("localhost", port));
+}
+
+public static Registry getRegistry(String host) throws RemoteException {
+ return (getRegistry(host, Registry.REGISTRY_PORT));
+}
+
+public static Registry getRegistry(String host, int port) throws RemoteException {
+ return (getRegistry(host, port, RMISocketFactory.getSocketFactory()));
+}
+
+public static Registry getRegistry(String host, int port, RMIClientSocketFactory csf) throws RemoteException {
+ RemoteRef ref = new UnicastRef(new ObjID(ObjID.REGISTRY_ID), host, port, csf);
+ return (new RegistryImpl_Stub(ref));
+}
+
+public static Registry createRegistry(int port) throws RemoteException {
+ return (createRegistry(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory()));
+}
+
+public static Registry createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
+ return (new RegistryImpl(port, csf, ssf));
+}
+
+}
diff --git a/libjava/java/rmi/registry/Registry.java b/libjava/java/rmi/registry/Registry.java
new file mode 100644
index 0000000..2a67f35
--- /dev/null
+++ b/libjava/java/rmi/registry/Registry.java
@@ -0,0 +1,51 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.registry;
+
+import java.rmi.RemoteException;
+import java.rmi.NotBoundException;
+import java.rmi.AccessException;
+import java.rmi.AlreadyBoundException;
+import java.rmi.Remote;
+
+public interface Registry
+ extends Remote {
+
+public static int REGISTRY_PORT = 1099;
+
+public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException;
+
+public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException;
+
+public void unbind(String name) throws RemoteException, NotBoundException, AccessException;
+
+public void rebind(String name, Remote obj) throws RemoteException, AccessException;
+
+public String[] list() throws RemoteException, AccessException;
+
+}
diff --git a/libjava/java/rmi/registry/RegistryHandler.java b/libjava/java/rmi/registry/RegistryHandler.java
new file mode 100644
index 0000000..d867a45
--- /dev/null
+++ b/libjava/java/rmi/registry/RegistryHandler.java
@@ -0,0 +1,39 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.registry;
+
+import java.rmi.RemoteException;
+import java.rmi.UnknownHostException;
+
+public interface RegistryHandler {
+
+public Registry registryStub(String host, int port) throws RemoteException, UnknownHostException;
+
+public Registry registryImpl(int port) throws RemoteException;
+
+}
diff --git a/libjava/java/rmi/server/ExportException.java b/libjava/java/rmi/server/ExportException.java
new file mode 100644
index 0000000..a3a2793
--- /dev/null
+++ b/libjava/java/rmi/server/ExportException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.rmi.RemoteException;
+
+public class ExportException
+ extends RemoteException {
+
+public ExportException(String s) {
+ super(s);
+}
+
+public ExportException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/server/LoaderHandler.java b/libjava/java/rmi/server/LoaderHandler.java
new file mode 100644
index 0000000..e96cf2c
--- /dev/null
+++ b/libjava/java/rmi/server/LoaderHandler.java
@@ -0,0 +1,44 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+
+public interface LoaderHandler {
+
+public static final String packagePrefix = "";
+
+public Class loadClass(String name) throws MalformedURLException, ClassNotFoundException;
+
+public Class loadClass(URL codebase, String name) throws MalformedURLException, ClassNotFoundException;
+
+public Object getSecurityContext(ClassLoader loader);
+
+}
diff --git a/libjava/java/rmi/server/LogStream.java b/libjava/java/rmi/server/LogStream.java
new file mode 100644
index 0000000..e5e1183
--- /dev/null
+++ b/libjava/java/rmi/server/LogStream.java
@@ -0,0 +1,92 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.io.PrintStream;
+import java.io.OutputStream;
+import java.io.IOException;
+
+public class LogStream
+ extends PrintStream {
+
+public static final int SILENT = 0;
+public static final int BRIEF = 1;
+public static final int VERBOSE = 2;
+
+private static PrintStream defStream;
+
+private LogStream(OutputStream s) {
+ super(s);
+}
+
+public static LogStream log(String name) {
+ throw new Error("Not implemented");
+}
+
+public static PrintStream getDefaultStream() {
+ return (defStream);
+}
+
+public static void setDefaultStream(PrintStream s) {
+ defStream = s;
+}
+
+public OutputStream getOutputStream() {
+ return (out);
+}
+
+public void setOutputStream(OutputStream s) {
+ out = s;
+}
+
+public void write(int b) {
+ super.write(b);
+}
+
+public void write(byte[] b, int off, int len) {
+ super.write(b, off, len);
+}
+
+public String toString() {
+ throw new Error("Not implemented");
+}
+
+public static int parseLevel(String s) {
+ if (s.equalsIgnoreCase("silent")) {
+ return (SILENT);
+ }
+ if (s.equalsIgnoreCase("brief")) {
+ return (BRIEF);
+ }
+ if (s.equalsIgnoreCase("verbose")) {
+ return (VERBOSE);
+ }
+ return (SILENT);
+}
+
+}
diff --git a/libjava/java/rmi/server/ObjID.java b/libjava/java/rmi/server/ObjID.java
new file mode 100644
index 0000000..038e3f9
--- /dev/null
+++ b/libjava/java/rmi/server/ObjID.java
@@ -0,0 +1,95 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.io.Serializable;
+import java.io.ObjectOutput;
+import java.io.ObjectInput;
+import java.io.IOException;
+import java.lang.Math;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.util.Random;
+
+public final class ObjID
+ implements Serializable {
+
+static final long serialVersionUID = -6386392263968365220L;
+
+private static long next = 0x8000000000000000L;
+private static final Object lock = ObjID.class;
+
+public static final int REGISTRY_ID = 0;
+public static final int ACTIVATOR_ID = 1;
+public static final int DGC_ID = 2;
+
+private long objNum;
+private UID space;
+
+public ObjID() {
+ synchronized (lock) {
+ objNum = next++;
+ }
+ space = new UID();
+}
+
+public ObjID(int num) {
+ objNum = (long)num;
+ space = new UID((short)0);
+}
+
+public void write(ObjectOutput out) throws IOException {
+ DataOutput dout = (DataOutput)out;
+ dout.writeLong(objNum);
+ space.write(dout);
+}
+
+public static ObjID read(ObjectInput in) throws IOException {
+ DataInput din = (DataInput)in;
+ ObjID id = new ObjID();
+ id.objNum = din.readLong();
+ id.space = UID.read(din);
+ return (id);
+}
+
+public int hashCode() {
+ return ((int)objNum);
+}
+
+public boolean equals(Object obj) {
+ if (obj instanceof ObjID && this.objNum == ((ObjID)obj).objNum) {
+ return (true);
+ }
+ return (false);
+}
+
+public String toString() {
+ return ("[objNum: " + objNum + ", " + space + "]");
+}
+
+}
diff --git a/libjava/java/rmi/server/Operation.java b/libjava/java/rmi/server/Operation.java
new file mode 100644
index 0000000..c75fec4
--- /dev/null
+++ b/libjava/java/rmi/server/Operation.java
@@ -0,0 +1,46 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+public class Operation {
+
+private String operation;
+
+public Operation(String op) {
+ operation = op;
+}
+
+public String getOperation() {
+ return (operation);
+}
+
+public String toString() {
+ return (operation);
+}
+
+}
diff --git a/libjava/java/rmi/server/RMIClassLoader.java b/libjava/java/rmi/server/RMIClassLoader.java
new file mode 100644
index 0000000..76b48b7
--- /dev/null
+++ b/libjava/java/rmi/server/RMIClassLoader.java
@@ -0,0 +1,92 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.net.URL;
+import java.net.URLConnection;
+import java.io.IOException;
+import java.io.DataInputStream;
+import java.net.MalformedURLException;
+import java.util.StringTokenizer;
+
+public class RMIClassLoader {
+
+static private class MyClassLoader extends ClassLoader {
+
+Class defineClass(String name, byte[] data) {
+ return (defineClass(name, data, 0, data.length));
+}
+}
+static private MyClassLoader loader = new MyClassLoader();
+
+/**
+ * @deprecated
+ */
+public static Class loadClass(String name) throws MalformedURLException, ClassNotFoundException {
+ return (loadClass(System.getProperty("java.rmi.server.codebase"), name));
+}
+
+public static Class loadClass(URL codebase, String name) throws MalformedURLException, ClassNotFoundException {
+ URL u = new URL(codebase, name + ".class");
+ try {
+ URLConnection conn = u.openConnection();
+ DataInputStream strm = new DataInputStream(conn.getInputStream());
+ byte data[] = new byte[conn.getContentLength()];
+ strm.readFully(data);
+ return (loader.defineClass(name, data));
+ }
+ catch (IOException _) {
+ throw new ClassNotFoundException(name);
+ }
+}
+
+public static Class loadClass(String codebase, String name) throws MalformedURLException, ClassNotFoundException {
+ StringTokenizer tok = new StringTokenizer(codebase, ":");
+ while (tok.hasMoreTokens()) {
+ try {
+ return (loadClass(new URL(tok.nextToken()), name));
+ }
+ catch (ClassNotFoundException _) {
+ // Ignore - try the next one.
+ }
+ }
+ throw new ClassNotFoundException(name);
+}
+
+public static String getClassAnnotation(Class cl) {
+ return (null); // We don't yet do this.
+}
+
+/**
+ * @deprecated
+ */
+public static Object getSecurityContext(ClassLoader loader) {
+ throw new Error("Not implemented");
+}
+
+}
diff --git a/libjava/java/rmi/server/RMIClientSocketFactory.java b/libjava/java/rmi/server/RMIClientSocketFactory.java
new file mode 100644
index 0000000..1eda8da
--- /dev/null
+++ b/libjava/java/rmi/server/RMIClientSocketFactory.java
@@ -0,0 +1,37 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.net.Socket;
+import java.io.IOException;
+
+public interface RMIClientSocketFactory {
+
+public Socket createSocket(String host, int port) throws IOException;
+
+}
diff --git a/libjava/java/rmi/server/RMIFailureHandler.java b/libjava/java/rmi/server/RMIFailureHandler.java
new file mode 100644
index 0000000..e729593
--- /dev/null
+++ b/libjava/java/rmi/server/RMIFailureHandler.java
@@ -0,0 +1,34 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+public interface RMIFailureHandler {
+
+public boolean failure(Exception ex);
+
+}
diff --git a/libjava/java/rmi/server/RMIServerSocketFactory.java b/libjava/java/rmi/server/RMIServerSocketFactory.java
new file mode 100644
index 0000000..46245bd
--- /dev/null
+++ b/libjava/java/rmi/server/RMIServerSocketFactory.java
@@ -0,0 +1,37 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.net.ServerSocket;
+import java.io.IOException;
+
+public interface RMIServerSocketFactory {
+
+public ServerSocket createServerSocket(int port) throws IOException;
+
+}
diff --git a/libjava/java/rmi/server/RMISocketFactory.java b/libjava/java/rmi/server/RMISocketFactory.java
new file mode 100644
index 0000000..bc7f8c3
--- /dev/null
+++ b/libjava/java/rmi/server/RMISocketFactory.java
@@ -0,0 +1,74 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.net.Socket;
+import java.net.ServerSocket;
+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);
+}
+
+}
diff --git a/libjava/java/rmi/server/RemoteCall.java b/libjava/java/rmi/server/RemoteCall.java
new file mode 100644
index 0000000..ceb8abe
--- /dev/null
+++ b/libjava/java/rmi/server/RemoteCall.java
@@ -0,0 +1,46 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.lang.Exception;
+import java.io.IOException;
+import java.io.ObjectOutput;
+import java.io.ObjectInput;
+import java.io.StreamCorruptedException;
+
+public interface RemoteCall {
+
+public ObjectOutput getOutputStream() throws IOException;
+public void releaseOutputStream() throws IOException;
+public ObjectInput getInputStream() throws IOException;
+public void releaseInputStream() throws IOException;
+public ObjectOutput getResultStream(boolean success) throws IOException, StreamCorruptedException;
+public void executeCall() throws Exception;
+public void done() throws IOException;
+
+}
diff --git a/libjava/java/rmi/server/RemoteObject.java b/libjava/java/rmi/server/RemoteObject.java
new file mode 100644
index 0000000..6f12866
--- /dev/null
+++ b/libjava/java/rmi/server/RemoteObject.java
@@ -0,0 +1,119 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.io.Serializable;
+import java.rmi.Remote;
+import java.rmi.NoSuchObjectException;
+import java.rmi.UnmarshalException;
+import java.rmi.server.RemoteRef;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.IOException;
+import java.lang.ClassNotFoundException;
+import java.lang.InstantiationException;
+import java.lang.IllegalAccessException;
+
+public abstract class RemoteObject
+ implements Remote, Serializable {
+
+public static final long serialVersionUID = -3215090123894869218l;
+
+protected transient RemoteRef ref;
+
+protected RemoteObject() {
+ this(null);
+}
+
+protected RemoteObject(RemoteRef newref) {
+ ref = newref;
+}
+
+public RemoteRef getRef() {
+ return (ref);
+}
+
+public static Remote toStub(Remote obj) throws NoSuchObjectException {
+ throw new Error("Not implemented");
+}
+
+public int hashCode() {
+ if (ref == null) {
+ return (0);
+ }
+ else {
+ return (ref.hashCode());
+ }
+}
+
+public boolean equals(Object obj) {
+ // We only compare references.
+ return (this == obj);
+}
+
+public String toString() {
+ return (ref.toString());
+}
+
+private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+ String cname = in.readUTF();
+ if (!cname.equals("")) {
+ cname = RemoteRef.packagePrefix + '.' + cname;
+ try {
+ Class cls = Class.forName(cname);
+ ref = (RemoteRef)cls.newInstance();
+ }
+ catch (InstantiationException e1) {
+ throw new UnmarshalException("failed to create ref");
+ }
+ catch (IllegalAccessException e2) {
+ throw new UnmarshalException("failed to create ref");
+ }
+ ref.readExternal(in);
+ }
+ else {
+ ref = (RemoteRef)in.readObject();
+ }
+}
+
+private void writeObject(ObjectOutputStream out) throws IOException, ClassNotFoundException {
+ if (ref == null) {
+ throw new UnmarshalException("no ref to serialize");
+ }
+ String cname = ref.getRefClass(out);
+ if (cname != null && cname.length() > 0) {
+ out.writeUTF(cname);
+ ref.writeExternal(out);
+ }
+ else {
+ out.writeUTF("");
+ out.writeObject(ref);
+ }
+}
+
+}
diff --git a/libjava/java/rmi/server/RemoteRef.java b/libjava/java/rmi/server/RemoteRef.java
new file mode 100644
index 0000000..f9e57ce
--- /dev/null
+++ b/libjava/java/rmi/server/RemoteRef.java
@@ -0,0 +1,51 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.lang.reflect.Method;
+import java.io.Externalizable;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.io.ObjectOutput;
+
+public interface RemoteRef
+ extends Externalizable {
+
+public static final long serialVersionUID = 0;
+public static final String packagePrefix = "gnu.java.rmi.server";
+
+public void invoke(RemoteCall call) throws Exception;
+public Object invoke(Remote obj, Method method, Object[] params, long opnum) throws Exception;
+public RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash) throws RemoteException;
+public void done(RemoteCall call) throws RemoteException;
+public boolean remoteEquals(RemoteRef ref);
+public int remoteHashCode();
+public String getRefClass(ObjectOutput out);
+public String remoteToString();
+
+}
diff --git a/libjava/java/rmi/server/RemoteServer.java b/libjava/java/rmi/server/RemoteServer.java
new file mode 100644
index 0000000..24a564a
--- /dev/null
+++ b/libjava/java/rmi/server/RemoteServer.java
@@ -0,0 +1,56 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.io.OutputStream;
+import java.io.PrintStream;
+
+public abstract class RemoteServer
+ extends RemoteObject {
+
+protected RemoteServer() {
+ super();
+}
+
+protected RemoteServer(RemoteRef ref) {
+ super(ref);
+}
+
+public static String getClientHost() throws ServerNotActiveException {
+ throw new Error("Not implemented");
+}
+
+public static void setLog(OutputStream out) {
+ throw new Error("Not implemented");
+}
+
+public static PrintStream getLog() {
+ throw new Error("Not implemented");
+}
+
+}
diff --git a/libjava/java/rmi/server/RemoteStub.java b/libjava/java/rmi/server/RemoteStub.java
new file mode 100644
index 0000000..c364cd8
--- /dev/null
+++ b/libjava/java/rmi/server/RemoteStub.java
@@ -0,0 +1,47 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+public abstract class RemoteStub
+ extends RemoteObject {
+
+public static final long serialVersionUID = -1585587260594494182l;
+
+protected RemoteStub() {
+ super();
+}
+
+protected RemoteStub(RemoteRef ref) {
+ super(ref);
+}
+
+protected static void setRef(RemoteStub stub, RemoteRef ref) {
+ stub.ref = ref;
+}
+
+}
diff --git a/libjava/java/rmi/server/ServerCloneException.java b/libjava/java/rmi/server/ServerCloneException.java
new file mode 100644
index 0000000..3912168
--- /dev/null
+++ b/libjava/java/rmi/server/ServerCloneException.java
@@ -0,0 +1,76 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.lang.CloneNotSupportedException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+public class ServerCloneException
+ extends CloneNotSupportedException {
+
+public Exception detail;
+
+public ServerCloneException(String s) {
+ super(s);
+ detail = null;
+}
+
+public ServerCloneException(String s, Exception e) {
+ super(s);
+ detail = e;
+}
+
+public String getMessage() {
+ if (detail != null) {
+ return (super.getMessage() + ":" + detail.getMessage());
+ }
+ else {
+ return (super.getMessage());
+ }
+}
+
+public void printStackTrace(PrintStream s) {
+ if (detail != null) {
+ detail.printStackTrace(s);
+ }
+ super.printStackTrace(s);
+}
+
+public void printStackTrace() {
+ printStackTrace(System.err);
+}
+
+public void printStackTrace(PrintWriter s) {
+ if (detail != null) {
+ detail.printStackTrace(s);
+ }
+ super.printStackTrace(s);
+}
+
+}
diff --git a/libjava/java/rmi/server/ServerNotActiveException.java b/libjava/java/rmi/server/ServerNotActiveException.java
new file mode 100644
index 0000000..90747f7
--- /dev/null
+++ b/libjava/java/rmi/server/ServerNotActiveException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.lang.Exception;
+
+public class ServerNotActiveException
+ extends Exception {
+
+public ServerNotActiveException() {
+ super();
+}
+
+public ServerNotActiveException(String s) {
+ super(s);
+}
+
+}
diff --git a/libjava/java/rmi/server/ServerRef.java b/libjava/java/rmi/server/ServerRef.java
new file mode 100644
index 0000000..fc75669d
--- /dev/null
+++ b/libjava/java/rmi/server/ServerRef.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.rmi.server.RemoteStub;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.server.ServerNotActiveException;
+
+public interface ServerRef
+ extends RemoteRef {
+
+public static final long serialVersionUID = 0;
+
+public RemoteStub exportObject(Remote obj, Object data) throws RemoteException;
+public String getClientHost() throws ServerNotActiveException;
+
+}
diff --git a/libjava/java/rmi/server/Skeleton.java b/libjava/java/rmi/server/Skeleton.java
new file mode 100644
index 0000000..99339d5
--- /dev/null
+++ b/libjava/java/rmi/server/Skeleton.java
@@ -0,0 +1,39 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.rmi.Remote;
+import java.lang.Exception;
+import java.rmi.server.RemoteCall;
+
+public interface Skeleton {
+
+public void dispatch(Remote obj, RemoteCall theCall, int opnum, long hash) throws Exception;
+public Operation[] getOperations();
+
+}
diff --git a/libjava/java/rmi/server/SkeletonMismatchException.java b/libjava/java/rmi/server/SkeletonMismatchException.java
new file mode 100644
index 0000000..e74ae51
--- /dev/null
+++ b/libjava/java/rmi/server/SkeletonMismatchException.java
@@ -0,0 +1,41 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.rmi.RemoteException;
+
+public class SkeletonMismatchException
+ extends RemoteException {
+
+public static final long serialVersionUID = -7780460454818859281l;
+
+public SkeletonMismatchException(String s) {
+ super(s);
+}
+
+}
diff --git a/libjava/java/rmi/server/SkeletonNotFoundException.java b/libjava/java/rmi/server/SkeletonNotFoundException.java
new file mode 100644
index 0000000..26dfe88
--- /dev/null
+++ b/libjava/java/rmi/server/SkeletonNotFoundException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.rmi.RemoteException;
+
+public class SkeletonNotFoundException
+ extends RemoteException {
+
+public SkeletonNotFoundException(String s) {
+ super(s);
+}
+
+public SkeletonNotFoundException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/server/SocketSecurityException.java b/libjava/java/rmi/server/SocketSecurityException.java
new file mode 100644
index 0000000..10b0b80
--- /dev/null
+++ b/libjava/java/rmi/server/SocketSecurityException.java
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.rmi.server.ExportException;
+
+public class SocketSecurityException
+ extends ExportException {
+
+public SocketSecurityException(String s) {
+ super(s);
+}
+
+public SocketSecurityException(String s, Exception e) {
+ super(s, e);
+}
+
+}
diff --git a/libjava/java/rmi/server/UID.java b/libjava/java/rmi/server/UID.java
new file mode 100644
index 0000000..49d256e
--- /dev/null
+++ b/libjava/java/rmi/server/UID.java
@@ -0,0 +1,120 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.io.Serializable;
+import java.io.DataOutput;
+import java.io.DataInput;
+import java.io.IOException;
+import java.util.Random;
+import java.lang.Thread;
+import java.lang.InterruptedException;
+
+public final class UID
+ implements Serializable {
+
+public static final long serialVersionUID = 1086053664494604050L;
+
+private static final Object lock = UID.class;
+private static long baseTime = System.currentTimeMillis();
+private static short nextCount = Short.MIN_VALUE;
+// This is sun's algorithm - don't ask me why ...
+private static final int uniqueNr = (new Object()).hashCode();
+
+private int unique;
+private long time;
+private short count;
+
+/**
+ * This is sun's algorithm - don't ask me why ...
+ */
+public UID() {
+ synchronized (lock) {
+ if (count == Short.MAX_VALUE) {
+ long newtime;
+ for (;;) {
+ newtime = System.currentTimeMillis();
+ if (newtime - baseTime > 1000) {
+ break;
+ }
+ try {
+ Thread.sleep(1000);
+ }
+ catch (InterruptedException _) {
+ }
+ }
+ baseTime = newtime;
+ nextCount = Short.MIN_VALUE;
+ }
+ count = nextCount++;
+ unique = uniqueNr;
+ time = baseTime;
+ }
+}
+
+public UID(short num) {
+ unique = (int)num;
+ time = 0;
+ count = 0;
+}
+
+public int hashCode() {
+ return (unique);
+}
+
+public boolean equals(Object obj) {
+ if (obj instanceof UID) {
+ UID uid = (UID)obj;
+ if (this.unique == uid.unique &&
+ this.time == uid.time &&
+ this.count == uid.count) {
+ return (true);
+ }
+ }
+ return (false);
+}
+
+public String toString() {
+ return ("[UID: " + unique + "," + time + "," + count + "]");
+}
+
+public void write(DataOutput out) throws IOException {
+ out.writeInt(unique);
+ out.writeLong(time);
+ out.writeShort(count);
+}
+
+public static UID read(DataInput in) throws IOException {
+ UID id = new UID();
+ id.unique = in.readInt();
+ id.time = in.readLong();
+ id.count = in.readShort();
+ return (id);
+}
+
+}
diff --git a/libjava/java/rmi/server/UnicastRemoteObject.java b/libjava/java/rmi/server/UnicastRemoteObject.java
new file mode 100644
index 0000000..3f78893
--- /dev/null
+++ b/libjava/java/rmi/server/UnicastRemoteObject.java
@@ -0,0 +1,76 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+import java.rmi.RemoteException;
+import java.rmi.Remote;
+import java.rmi.server.RemoteRef;
+import java.rmi.NoSuchObjectException;
+import gnu.java.rmi.server.UnicastServerRef;
+
+public class UnicastRemoteObject
+ extends RemoteServer {
+
+protected UnicastRemoteObject() throws RemoteException {
+ this(0);
+}
+
+protected UnicastRemoteObject(int port) throws RemoteException {
+ this(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory());
+}
+
+protected UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
+ super(new UnicastServerRef(new ObjID(), port, ssf));
+}
+
+protected UnicastRemoteObject(RemoteRef ref) throws RemoteException {
+ super((UnicastServerRef)ref);
+}
+
+public Object clone() throws CloneNotSupportedException {
+ throw new Error("Not implemented");
+}
+
+public static RemoteStub exportObject(Remote obj) throws RemoteException {
+ UnicastServerRef sref = (UnicastServerRef)((RemoteObject)obj).getRef();
+ return (sref.exportObject(obj));
+}
+
+public static Remote exportObject(Remote obj, int port) throws RemoteException {
+ return (exportObject(obj));
+}
+
+public static Remote exportObject(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
+ return (exportObject(obj));
+}
+
+public static boolean unexportObject(Remote obj, boolean force) throws NoSuchObjectException {
+ throw new Error("Not implemented");
+}
+
+}
diff --git a/libjava/java/rmi/server/Unreferenced.java b/libjava/java/rmi/server/Unreferenced.java
new file mode 100644
index 0000000..20678d1
--- /dev/null
+++ b/libjava/java/rmi/server/Unreferenced.java
@@ -0,0 +1,34 @@
+/*
+ Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License.
+ */
+
+package java.rmi.server;
+
+public interface Unreferenced {
+
+public void unreferenced();
+
+}