| CONTENTS | PREV | NEXT | Java Remote Method Invocation |
RemoteException Class
The classjava.rmi.RemoteExceptionis the common superclass of a number of communication-related exceptions that may occur during the execution of a remote method call. Each method of a remote interface, an interface, must listRemoteException(or one of its superclasses such asjava.io.IOExceptionorjava.lang.Exception) in its throws clause.
package java.rmi;public class RemoteException extends java.io.IOException { public Throwable detail;
public RemoteException(); public RemoteException(String s); public RemoteException(String s, Throwable ex);
public String getMessage(); public void printStackTrace(); public void printStackTrace(java.io.PrintStream ps); public void printStackTrace(java.io.PrintWriter pw); }
ARemoteExceptioncan be constructed with a detail message, s, and a nested exception, ex (aThrowable). Typically, the nested exception, ex, specified as a parameter in the third form of the constructor, is the underlying I/O exception that occurred during an RMI call.The
getMessagemethod returns the detail message of the exception, including the message from the nested exception (if any).The
printStackTracemethods are overridden from the classjava.lang.Throwableto print out the stack trace of the nested exception.
CONTENTS | PREV | NEXT
Copyright © 1997-1999 Sun Microsystems, Inc. All Rights Reserved.