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
,
JndiRmiServiceExporter
logger
Constructor and Description |
---|
RmiBasedExporter() |
Modifier and Type | Method and Description |
---|---|
protected java.rmi.Remote |
getObjectToExport()
Determine the object to export: either the service object itself
or a RmiInvocationWrapper in case of a non-RMI service object.
|
protected java.lang.Object |
invoke(RemoteInvocation invocation,
java.lang.Object targetObject)
Redefined here to be visible to RmiInvocationWrapper.
|
getRemoteInvocationExecutor, invokeAndCreateResult, setRemoteInvocationExecutor
checkService, checkServiceInterface, getExporterName, getProxyForService, getService, getServiceInterface, setInterceptors, setRegisterTraceInterceptor, setService, setServiceInterface
getBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoader
protected java.rmi.Remote getObjectToExport()
RemoteExporter.setService(java.lang.Object)
,
RemoteExporter.setServiceInterface(java.lang.Class<?>)
protected java.lang.Object invoke(RemoteInvocation invocation, java.lang.Object targetObject) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
invoke
in class RemoteInvocationBasedExporter
invocation
- the remote invocationtargetObject
- the target object to apply the invocation tojava.lang.NoSuchMethodException
- if the method name could not be resolvedjava.lang.IllegalAccessException
- if the method could not be accessedjava.lang.reflect.InvocationTargetException
- if the method invocation resulted in an exceptionRemoteInvocationExecutor.invoke(org.springframework.remoting.support.RemoteInvocation, java.lang.Object)