public abstract class RmiBasedExporter extends RemoteInvocationBasedExporter
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.
RmiServiceExporter,
JndiRmiServiceExporterlogger| Constructor and Description |
|---|
RmiBasedExporter() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getRemoteInvocationExecutor, invokeAndCreateResult, setRemoteInvocationExecutorcheckService, checkServiceInterface, getExporterName, getProxyForService, getService, getServiceInterface, setInterceptors, setRegisterTraceInterceptor, setService, setServiceInterfacegetBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoaderprotected Remote getObjectToExport()
RemoteExporter.setService(java.lang.Object),
RemoteExporter.setServiceInterface(java.lang.Class)protected Object invoke(RemoteInvocation invocation, Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
invoke in class RemoteInvocationBasedExporterinvocation - the remote invocationtargetObject - the target object to apply the invocation toNoSuchMethodException - if the method name could not be resolvedIllegalAccessException - if the method could not be accessedInvocationTargetException - if the method invocation resulted in an exceptionRemoteInvocationExecutor.invoke(org.springframework.remoting.support.RemoteInvocation, java.lang.Object)