org.springframework.remoting.rmi

## 类 RmiBasedExporter

- java.lang.Object
- - org.springframework.remoting.support.RemotingSupport
  - - org.springframework.remoting.support.RemoteExporter
    - - org.springframework.remoting.support.RemoteInvocationBasedExporter
      - - org.springframework.remoting.rmi.RmiBasedExporter

- 所有已实现的接口:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware
  直接已知子类:
    JndiRmiServiceExporter, RmiServiceExporter

      public abstract class RmiBasedExporter
      extends RemoteInvocationBasedExporter

  Convenient superclass for RMI-based remote exporters. Provides a facility to automatically wrap a given plain Java service object with an RmiInvocationWrapper, exposing the `RmiInvocationHandler` remote interface.

  Using the RMI invoker mechanism, RMI communication operates at the `RmiInvocationHandler` level, sharing a common invoker stub for any number of services. Service interfaces are not required to extend `java.rmi.Remote` or declare `java.rmi.RemoteException` on all service methods. However, in and out parameters still have to be serializable.

  从以下版本开始:
    1.2.5
  作者:
    Juergen Hoeller
  另请参阅:
    `RmiServiceExporter`, `JndiRmiServiceExporter`

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.remoting.support.RemotingSupport

      `logger`

  - ### 构造器概要

    构造器
    构造器和说明
    `RmiBasedExporter()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected Remote` | `getObjectToExport()` Determine the object to export: either the service object itself or a RmiInvocationWrapper in case of a non-RMI service object.
    `protected Object` | `invoke(RemoteInvocation invocation, Object targetObject)` Redefined here to be visible to RmiInvocationWrapper.

    - ### 从类继承的方法 org.springframework.remoting.support.RemoteInvocationBasedExporter

      `getRemoteInvocationExecutor, invokeAndCreateResult, setRemoteInvocationExecutor`

    - ### 从类继承的方法 org.springframework.remoting.support.RemoteExporter

      `checkService, checkServiceInterface, getExporterName, getProxyForService, getService, getServiceInterface, setInterceptors, setRegisterTraceInterceptor, setService, setServiceInterface`

    - ### 从类继承的方法 org.springframework.remoting.support.RemotingSupport

      `getBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoader`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### RmiBasedExporter

          public RmiBasedExporter()

  - ### 方法详细资料

    - #### getObjectToExport

          protected Remote getObjectToExport()

      Determine the object to export: either the service object itself or a RmiInvocationWrapper in case of a non-RMI service object.
      返回:
        the RMI object to export
      另请参阅:
        `RemoteExporter.setService(java.lang.Object)`, `RemoteExporter.setServiceInterface(java.lang.Class<?>)`

    - #### invoke

          protected Object invoke(RemoteInvocation invocation,
                                  Object targetObject)
                           throws NoSuchMethodException,
                                  IllegalAccessException,
                                  InvocationTargetException

      Redefined here to be visible to RmiInvocationWrapper. Simply delegates to the corresponding superclass method.
      覆盖:
        `invoke` 在类中 `RemoteInvocationBasedExporter`
      参数:
        `invocation` - the remote invocation
        `targetObject` - the target object to apply the invocation to
      返回:
        the invocation result
      抛出:
        `NoSuchMethodException` - if the method name could not be resolved
        `IllegalAccessException` - if the method could not be accessed
        `InvocationTargetException` - if the method invocation resulted in an exception
      另请参阅:
        `RemoteInvocationExecutor.invoke(org.springframework.remoting.support.RemoteInvocation, java.lang.Object)`