class RmiInvocationWrapper extends java.lang.Object implements RmiInvocationHandler
RmiInvocationHandler
. An instance
of this class exists for each remote object. Automatically created
by RmiServiceExporter
for non-RMI service implementations.
This is an SPI class, not to be used directly by applications.
RmiServiceExporter
Modifier and Type | Field and Description |
---|---|
private RmiBasedExporter |
rmiExporter |
private java.lang.Object |
wrappedObject |
Constructor and Description |
---|
RmiInvocationWrapper(java.lang.Object wrappedObject,
RmiBasedExporter rmiExporter)
Create a new RmiInvocationWrapper for the given object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getTargetInterfaceName()
Exposes the exporter's service interface, if any, as target interface.
|
java.lang.Object |
invoke(RemoteInvocation invocation)
Delegates the actual invocation handling to the RMI exporter.
|
private final java.lang.Object wrappedObject
private final RmiBasedExporter rmiExporter
public RmiInvocationWrapper(java.lang.Object wrappedObject, RmiBasedExporter rmiExporter)
wrappedObject
- the object to wrap with an RmiInvocationHandlerrmiExporter
- the RMI exporter to handle the actual invocation@Nullable public java.lang.String getTargetInterfaceName()
getTargetInterfaceName
in interface RmiInvocationHandler
null
if noneRemoteExporter.getServiceInterface()
@Nullable public java.lang.Object invoke(RemoteInvocation invocation) throws java.rmi.RemoteException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
invoke
in interface RmiInvocationHandler
invocation
- object that encapsulates invocation parametersjava.rmi.RemoteException
- in case of communication errorsjava.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 exceptionRmiBasedExporter.invoke(org.springframework.remoting.support.RemoteInvocation, Object)