summaryrefslogtreecommitdiff
path: root/libjava/java/rmi
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-16 20:55:56 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-16 20:55:56 +0000
commit3f426d8049b653045fae64ef871264af719bfcce (patch)
tree73f6b132b22f59924674c89196211107624c9e73 /libjava/java/rmi
parent7256f0346ff2ba86d841a03dd73b589bb91036b0 (diff)
downloadgcc-3f426d8049b653045fae64ef871264af719bfcce.tar.gz
2002-06-16 Nathanael Nerode <neroden@twcny.rr.com>
* java/rmi/AccessException.java: Remerge from Classpath. * java/rmi/AlreadyBoundException.java: Ditto. * java/rmi/ConnectException.java: Ditto. * java/rmi/ConnectIOException.java: Ditto. * java/rmi/MarshalException.java: Ditto. * java/rmi/NoSuchObjectException.java: Ditto. * java/rmi/NotBoundException.java: Ditto. * java/rmi/RemoteException.java: Ditto. * java/rmi/RMISecurityException.java: Ditto. * java/rmi/ServerError.java: Ditto. * java/rmi/ServerException.java: Ditto. * java/rmi/ServerRuntimeException.java: Ditto. * java/rmi/StubNotFoundException.java: Ditto. * java/rmi/UnexpectedExcpetion.java: Ditto. * java/rmi/UnknownHostException.java: Ditto. * java/rmi/UnmarshalException.java: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54678 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/rmi')
-rw-r--r--libjava/java/rmi/AccessException.java51
-rw-r--r--libjava/java/rmi/AlreadyBoundException.java46
-rw-r--r--libjava/java/rmi/ConnectException.java48
-rw-r--r--libjava/java/rmi/ConnectIOException.java48
-rw-r--r--libjava/java/rmi/MarshalException.java50
-rw-r--r--libjava/java/rmi/NoSuchObjectException.java41
-rw-r--r--libjava/java/rmi/NotBoundException.java50
-rw-r--r--libjava/java/rmi/RMISecurityException.java52
-rw-r--r--libjava/java/rmi/RemoteException.java144
-rw-r--r--libjava/java/rmi/ServerError.java35
-rw-r--r--libjava/java/rmi/ServerException.java49
-rw-r--r--libjava/java/rmi/ServerRuntimeException.java38
-rw-r--r--libjava/java/rmi/StubNotFoundException.java48
-rw-r--r--libjava/java/rmi/UnexpectedException.java48
-rw-r--r--libjava/java/rmi/UnknownHostException.java48
-rw-r--r--libjava/java/rmi/UnmarshalException.java63
16 files changed, 618 insertions, 241 deletions
diff --git a/libjava/java/rmi/AccessException.java b/libjava/java/rmi/AccessException.java
index 5ffdba0b5f8..389d2df059c 100644
--- a/libjava/java/rmi/AccessException.java
+++ b/libjava/java/rmi/AccessException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* AccessException.java -- thrown if the caller does not have access
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,17 +37,40 @@ exception statement from your version. */
package java.rmi;
-public class AccessException
- extends RemoteException {
-
-public static final long serialVersionUID = 6314925228044966088l;
+/**
+ * Thrown to indicate that the caller does not have permission to access
+ * certain data, such as <code>bind</code> in an ActivationSystem.
+ *
+ * @author unknown
+ * @see Naming
+ * @see ActivationSystem
+ * @since 1.1
+ */
+public class AccessException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 6314925228044966088l;
-public AccessException(String s) {
- super(s);
-}
-
-public AccessException(String s, Exception e) {
- super (s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public AccessException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public AccessException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/AlreadyBoundException.java b/libjava/java/rmi/AlreadyBoundException.java
index e64a58f803e..2062aede1ec 100644
--- a/libjava/java/rmi/AlreadyBoundException.java
+++ b/libjava/java/rmi/AlreadyBoundException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* AlreadyBoundException.java -- thrown if a binding is already bound
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,15 +37,37 @@ exception statement from your version. */
package java.rmi;
-public class AlreadyBoundException
- extends Exception {
-
-public AlreadyBoundException() {
- super();
-}
+/**
+ * Thrown on an attempt to bind an object in the registry that is already
+ * bound.
+ *
+ * @author unknown
+ * @see Naming#bind(String, Remote)
+ * @see Registry#bind(String, Remote)
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class AlreadyBoundException extends Exception
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 9218657361741657110L;
-public AlreadyBoundException(String s) {
- super (s);
-}
+ /**
+ * Create an exception with no message.
+ */
+ public AlreadyBoundException()
+ {
+ }
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public AlreadyBoundException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/rmi/ConnectException.java b/libjava/java/rmi/ConnectException.java
index eca5f4edb10..75a7c454fd5 100644
--- a/libjava/java/rmi/ConnectException.java
+++ b/libjava/java/rmi/ConnectException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* ConnectException.java -- thrown if a connection is refused
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,16 +37,38 @@ exception statement from your version. */
package java.rmi;
-public class ConnectException
- extends RemoteException {
-
+/**
+ * Thrown if a connection is refused for a remote call.
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class ConnectException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 4863550261346652506L;
-public ConnectException(String s) {
- super(s);
-}
-
-public ConnectException(String s, Exception e) {
- super (s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public ConnectException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public ConnectException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/ConnectIOException.java b/libjava/java/rmi/ConnectIOException.java
index 960b167599f..24c779d2bff 100644
--- a/libjava/java/rmi/ConnectIOException.java
+++ b/libjava/java/rmi/ConnectIOException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* ConnectIOException.java -- thrown if an IO exception occurs during connect
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,16 +37,38 @@ exception statement from your version. */
package java.rmi;
-public class ConnectIOException
- extends RemoteException {
-
+/**
+ * Wraps an I/O Exception thrown while connecting for a remote call.
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class ConnectIOException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = -8087809532704668744L;
-public ConnectIOException(String s) {
- super(s);
-}
-
-public ConnectIOException(String s, Exception e) {
- super (s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public ConnectIOException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public ConnectIOException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/MarshalException.java b/libjava/java/rmi/MarshalException.java
index efea1c93816..98482a965b5 100644
--- a/libjava/java/rmi/MarshalException.java
+++ b/libjava/java/rmi/MarshalException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* MarshalException.java -- wraps error while marshalling parameters
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,16 +37,40 @@ exception statement from your version. */
package java.rmi;
-public class MarshalException
- extends RemoteException {
-
+/**
+ * Thrown if an exception occurs while marshalling data to send in a remote
+ * call. The call may not be retransmitted, if the "at most once" semantics
+ * are to be preserved.
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class MarshalException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 6223554758134037936L;
-public MarshalException(String s) {
- super(s);
-}
-
-public MarshalException(String s, Exception e) {
- super (s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public MarshalException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public MarshalException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/NoSuchObjectException.java b/libjava/java/rmi/NoSuchObjectException.java
index ff9ba86f7f2..dd61f950cb1 100644
--- a/libjava/java/rmi/NoSuchObjectException.java
+++ b/libjava/java/rmi/NoSuchObjectException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* NoSuchObjectException.java -- thrown if the remote object no longer exists
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,13 +37,32 @@ exception statement from your version. */
package java.rmi;
-public class NoSuchObjectException
- extends RemoteException {
-
-public static final long serialVersionUID = 6619395951570472985L;
-
-public NoSuchObjectException(String s) {
- super(s);
-}
+/**
+ * Thrown on an attempt to invoke a call on an object that no longer exists
+ * in the remote Virtual Machine. The call may be retransmitted and still
+ * obey the semantics of "at most once".
+ *
+ * @author unknown
+ * @see RemoteObject#toStub(Remote)
+ * @see UnicastRemoteObject#unexportObject(Remote, boolean)
+ * @see Activatable#unexportObject(Remote, boolean)
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class NoSuchObjectException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 6619395951570472985L;
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public NoSuchObjectException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/rmi/NotBoundException.java b/libjava/java/rmi/NotBoundException.java
index e7c6cb9559c..95af177f399 100644
--- a/libjava/java/rmi/NotBoundException.java
+++ b/libjava/java/rmi/NotBoundException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* NotBoundException.java -- attempt to use a registry name with no binding
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,17 +37,39 @@ exception statement from your version. */
package java.rmi;
-public class NotBoundException
- extends Exception {
-
-public static final long serialVersionUID = -1857741824849069317l;
+/**
+ * Thrown on an attempt to lookup or unbind a registry name that has no
+ * associated binding.
+ *
+ * @author unknown
+ * @see Naming#lookup(String)
+ * @see Naming#unbind(String)
+ * @see Registry#lookup(String)
+ * @see Registry#unbind(String)
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class NotBoundException extends Exception
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = -1857741824849069317l;
-public NotBoundException() {
- super();
-}
-
-public NotBoundException(String s) {
- super (s);
-}
+ /**
+ * Create an exception with no message.
+ */
+ public NotBoundException()
+ {
+ }
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public NotBoundException(String s)
+ {
+ super(s);
+ }
}
diff --git a/libjava/java/rmi/RMISecurityException.java b/libjava/java/rmi/RMISecurityException.java
index 8f04fad5dd4..3697b7c9580 100644
--- a/libjava/java/rmi/RMISecurityException.java
+++ b/libjava/java/rmi/RMISecurityException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* RMISecurityException.java -- deprecated version of SecurityException
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,17 +37,41 @@ exception statement from your version. */
package java.rmi;
-import java.lang.SecurityException;
-
-public class RMISecurityException
- extends SecurityException {
+/**
+ * Never thrown, but originally intended to wrap a java.lang.SecurityException.
+ *
+ * @author unknown
+ * @since 1.1
+ * @deprecated use {@link SecurityException} instead
+ * @status updated to 1.4
+ */
+public class RMISecurityException extends SecurityException
+{
+ /**
+ * Compatible with JDK 1.1.
+ */
+ private static final long serialVersionUID = -8433406075740433514L;
-public RMISecurityException(String n) {
- super(n);
-}
-
-public RMISecurityException(String n, String a) {
- super(n);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ * @deprecated no longer needed
+ */
+ public RMISecurityException(String n)
+ {
+ super(n);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ * @deprecated no longer needed
+ */
+ public RMISecurityException(String n, String a)
+ {
+ super(n);
+ }
}
diff --git a/libjava/java/rmi/RemoteException.java b/libjava/java/rmi/RemoteException.java
index 0e0d5e72248..17e38b30bd7 100644
--- a/libjava/java/rmi/RemoteException.java
+++ b/libjava/java/rmi/RemoteException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* RemoteException.java -- common superclass for exceptions in java.rmi
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,59 +37,91 @@ exception statement from your version. */
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);
-}
+/**
+ * The superclass of exceptions related to RMI (remote method invocation).
+ * Classes that implement <code>java.rmi.Remote</code> should list this
+ * exception in their throws clause.
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class RemoteException extends IOException
+{
+ /**
+ * Compatible with JDK 1.2+.
+ */
+ private static final long serialVersionUID = -5148567311918794206l;
+
+ /**
+ * The cause of this exception. This pre-dates the exception chaining
+ * of Throwable; and although you can change this field, you are wiser
+ * to leave it alone.
+ *
+ * @serial the exception cause
+ */
+ public Throwable detail;
+
+ /**
+ * Create an exception with no message, and cause initialized to null.
+ */
+ public RemoteException()
+ {
+ this(null, null);
+ }
+
+ /**
+ * Create an exception with the given message, and cause initialized to null.
+ *
+ * @param s the message
+ */
+ public RemoteException(String s)
+ {
+ this(s, null);
+ }
+
+ /**
+ * Create an exception with the given message and cause.
+ *
+ * @param s the message
+ * @param ex the cause
+ */
+ public RemoteException(String s, Throwable e)
+ {
+ super(s);
+ initCause(e);
+ detail = e;
+ }
+
+ /**
+ * This method returns a message indicating what went wrong, in this
+ * format:
+ * <code>super.getMessage() + (detail == null ? ""
+ * : "; nested exception is:\n\t" + detail)<code>.
+ *
+ * @return the chained message
+ */
+ public String getMessage()
+ {
+ if (detail == this || detail == null)
+ return super.getMessage();
+ return super.getMessage() + "; nested exception is:\n\t" + detail;
+ }
+
+ /**
+ * Returns the cause of this exception. Note that this may not be the
+ * original cause, thanks to the <code>detail</code> field being public
+ * and non-final (yuck). However, to avoid violating the contract of
+ * Throwable.getCause(), this returns null if <code>detail == this</code>,
+ * as no exception can be its own cause.
+ *
+ * @return the cause
+ * @since 1.4
+ */
+ public Throwable getCause()
+ {
+ return detail == this ? null : detail;
+ }
}
diff --git a/libjava/java/rmi/ServerError.java b/libjava/java/rmi/ServerError.java
index e5e8147a4fc..59c6a55a41f 100644
--- a/libjava/java/rmi/ServerError.java
+++ b/libjava/java/rmi/ServerError.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* ServerError.java -- wraps an error while creating the server
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,11 +37,28 @@ exception statement from your version. */
package java.rmi;
-public class ServerError
- extends RemoteException {
-
-public ServerError(String s, Error e) {
- super(s, e);
-}
+/**
+ * Wraps any error thrown while processing the server of a remote call.
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class ServerError extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 8455284893909696482L;
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public ServerError(String s, Error e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/ServerException.java b/libjava/java/rmi/ServerException.java
index 2082c81c82e..17c3a579097 100644
--- a/libjava/java/rmi/ServerException.java
+++ b/libjava/java/rmi/ServerException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* ServerException.java -- wraps an exception while creating the server
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,17 +37,38 @@ exception statement from your version. */
package java.rmi;
-public class ServerException
- extends RemoteException {
-
-public static final long serialVersionUID = -4775845313121906682l;
+/**
+ * Wraps any exception thrown while processing the server of a remote call.
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class ServerException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = -4775845313121906682l;
-public ServerException(String s) {
- super(s);
-}
-
-public ServerException(String s, Exception e) {
- super(s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public ServerException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public ServerException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/ServerRuntimeException.java b/libjava/java/rmi/ServerRuntimeException.java
index 9c2550e97c7..d7e11916a69 100644
--- a/libjava/java/rmi/ServerRuntimeException.java
+++ b/libjava/java/rmi/ServerRuntimeException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* ServerRuntimeException.java -- wraps an exception while creating the server
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,11 +37,31 @@ exception statement from your version. */
package java.rmi;
-public class ServerRuntimeException
- extends RemoteException {
-
-public ServerRuntimeException(String s, Exception e) {
- super(s, e);
-}
+/**
+ * Wraps any runtime exception thrown while processing the server of a
+ * remote call. Note, this exception is no longer used.
+ *
+ * @author unknown
+ * @since 1.1
+ * @deprecated no replacement
+ * @status updated to 1.4
+ */
+public class ServerRuntimeException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1.
+ */
+ private static final long serialVersionUID = 7054464920481467219L;
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ * @deprecated no longer needed
+ */
+ public ServerRuntimeException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/StubNotFoundException.java b/libjava/java/rmi/StubNotFoundException.java
index e6b384f7bf7..837153bca81 100644
--- a/libjava/java/rmi/StubNotFoundException.java
+++ b/libjava/java/rmi/StubNotFoundException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* StubNotFoundException.java -- thrown if a valid stub is not found
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,15 +37,41 @@ exception statement from your version. */
package java.rmi;
-public class StubNotFoundException
- extends RemoteException {
+/**
+ * Thrown if a valid stub class is not found for an object when it is exported.
+ *
+ * @author unknown
+ * @see UnicastRemoteObject
+ * @see Activatable
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class StubNotFoundException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.2+.
+ */
+ private static final long serialVersionUID = -7088199405468872373L;
-public StubNotFoundException(String s) {
- super(s);
-}
-public StubNotFoundException(String s, Exception e) {
- super(s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public StubNotFoundException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public StubNotFoundException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/UnexpectedException.java b/libjava/java/rmi/UnexpectedException.java
index 9cfddb45759..42b6f15d506 100644
--- a/libjava/java/rmi/UnexpectedException.java
+++ b/libjava/java/rmi/UnexpectedException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* UnexpectedException.java -- an unexpected checked exception was received
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,15 +37,39 @@ exception statement from your version. */
package java.rmi;
-public class UnexpectedException
- extends RemoteException {
-
-public UnexpectedException(String s) {
- super(s);
-}
+/**
+ * Thrown if an unexpected checked exception was received in a remote
+ * procedure call.
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class UnexpectedException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 1800467484195073863L;
-public UnexpectedException(String s, Exception e) {
- super(s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public UnexpectedException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public UnexpectedException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/UnknownHostException.java b/libjava/java/rmi/UnknownHostException.java
index 9e3a95efe80..089800c362c 100644
--- a/libjava/java/rmi/UnknownHostException.java
+++ b/libjava/java/rmi/UnknownHostException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* UnknownHostException.java -- wraps java.net.UnknownHostException in RMI
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,15 +37,39 @@ exception statement from your version. */
package java.rmi;
-public class UnknownHostException
- extends RemoteException {
-
-public UnknownHostException(String s) {
- super(s);
-}
+/**
+ * Thrown if a java.net.UnknownHostException occurs during a remote
+ * procedure call.
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class UnknownHostException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = -8152710247442114228L;
-public UnknownHostException(String s, Exception e) {
- super(s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public UnknownHostException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public UnknownHostException(String s, Exception e)
+ {
+ super(s, e);
+ }
}
diff --git a/libjava/java/rmi/UnmarshalException.java b/libjava/java/rmi/UnmarshalException.java
index 78a3c629c8c..cff74a9357f 100644
--- a/libjava/java/rmi/UnmarshalException.java
+++ b/libjava/java/rmi/UnmarshalException.java
@@ -1,5 +1,5 @@
-/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* UnmarshalException.java -- wraps error while unmarshalling parameters
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ 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
@@ -37,17 +37,52 @@ exception statement from your version. */
package java.rmi;
-public class UnmarshalException
- extends RemoteException {
-
-public static final long serialVersionUID = 594380845140740218l;
+/**
+ * Thrown if an exception occurs while unmarshalling parameters or results
+ * of a remote method call. This includes:<br><ul>
+ * <li>if an exception occurs while unmarshalling the call header</li>
+ * <li>if the protocol for the return value is invalid</li>
+ * <li>if a java.io.IOException occurs unmarshalling parameters (on the
+ * server side) or the return value (on the client side).</li>
+ * <li>if a java.lang.ClassNotFoundException occurs during unmarshalling
+ * parameters or return values</li>
+ * <li>if no skeleton can be loaded on the server-side; note that skeletons
+ * are required in the 1.1 stub protocol, but not in the 1.2 stub
+ * protocol.</li>
+ * <li>if the method hash is invalid (i.e., missing method).</li>
+ * <li>if there is a failure to create a remote reference object for a remote
+ * object's stub when it is unmarshalled.</li>
+ * </ul>
+ *
+ * @author unknown
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public class UnmarshalException extends RemoteException
+{
+ /**
+ * Compatible with JDK 1.1+.
+ */
+ private static final long serialVersionUID = 594380845140740218l;
-public UnmarshalException(String s) {
- super(s);
-}
-
-public UnmarshalException(String s, Exception e) {
- super(s, e);
-}
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public UnmarshalException(String s)
+ {
+ super(s);
+ }
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param e the cause
+ */
+ public UnmarshalException(String s, Exception e)
+ {
+ super(s, e);
+ }
}