- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- java.rmi.RemoteException
-
- All Implemented Interfaces:
-
Serializable
- 已知直接子类:
-
AccessException,ActivateFailedException,ActivityCompletedException,ActivityRequiredException,ConnectException,ConnectIOException,ExportException,InvalidActivityException,InvalidTransactionException,MarshalException,NoSuchObjectException,ServerError,ServerException,ServerRuntimeException,SkeletonMismatchException,SkeletonNotFoundException,StubNotFoundException,TransactionRequiredException,TransactionRolledbackException,UnexpectedException,UnknownHostException,UnmarshalException
public class RemoteException extends IOException
ARemoteException是在执行远程方法调用期间可能发生的许多通信相关异常的常见超类。 远程接口的每种方法,扩展java.rmi.Remote的接口必须在其throws子句中列出RemoteException。从版本1.4开始,这种异常已被改进以符合通用异常链接机制。 可以在施工时间提供并通过公共
detail字段访问的“包裹的远程异常”现在被称为原因 ,并且可以通过Throwable.getCause()方法以及前述的“传统字段”来访问。调用方法
Throwable.initCause(Throwable)上的一个实例RemoteException总是抛出IllegalStateException。- 从以下版本开始:
- 1.1
- 另请参见:
- Serialized Form
-
-
构造方法摘要
构造方法 Constructor 描述 RemoteException()构造一个RemoteException。RemoteException(String s)构造具有指定详细消息的RemoteException。RemoteException(String s, Throwable cause)构造一个具有指定的详细消息和原因的RemoteException。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 ThrowablegetCause()返回此异常的原因。StringgetMessage()返回详细信息,包括原因的消息(如果有的话)的异常。-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
字段详细信息
-
detail
public Throwable detail
远程异常的原因。该领域早于通用异常链接工具。
Throwable.getCause()方法现在是获取此信息的首选方法。
-
-
构造方法详细信息
-
RemoteException
public RemoteException()
构造一个RemoteException。
-
RemoteException
public RemoteException(String s)
构造具有指定详细消息的RemoteException。- 参数
-
s- 详细信息
-
-