类 RmiClientInterceptorUtils


  • public abstract class RmiClientInterceptorUtils
    extends Object
    Factored-out methods for performing invocations within an RMI client. Can handle both RMI and non-RMI service interfaces working on an RMI stub.

    Note: This is an SPI class, not intended to be used by applications.

    从以下版本开始:
    1.1
    作者:
    Juergen Hoeller
    • 方法详细资料

      • convertRmiAccessException

        public static Exception convertRmiAccessException​(Method method,
                                                          Throwable ex,
                                                          String message)
        Wrap the given arbitrary exception that happened during remote access in either a RemoteException or a Spring RemoteAccessException (if the method signature does not support RemoteException).

        Only call this for remote access exceptions, not for exceptions thrown by the target service itself!

        参数:
        method - the invoked method
        ex - the exception that happened, to be used as cause for the RemoteAccessException or RemoteException
        message - the message for the RemoteAccessException respectively RemoteException
        返回:
        the exception to be thrown to the caller
      • convertRmiAccessException

        public static Exception convertRmiAccessException​(Method method,
                                                          RemoteException ex,
                                                          String serviceName)
        Convert the given RemoteException that happened during remote access to Spring's RemoteAccessException if the method signature does not support RemoteException. Else, return the original RemoteException.
        参数:
        method - the invoked method
        ex - the RemoteException that happened
        serviceName - the name of the service (for debugging purposes)
        返回:
        the exception to be thrown to the caller
      • convertRmiAccessException

        public static Exception convertRmiAccessException​(Method method,
                                                          RemoteException ex,
                                                          boolean isConnectFailure,
                                                          String serviceName)
        Convert the given RemoteException that happened during remote access to Spring's RemoteAccessException if the method signature does not support RemoteException. Else, return the original RemoteException.
        参数:
        method - the invoked method
        ex - the RemoteException that happened
        isConnectFailure - whether the given exception should be considered a connect failure
        serviceName - the name of the service (for debugging purposes)
        返回:
        the exception to be thrown to the caller