public abstract class RemoteInvocationBasedExporter extends RemoteExporter
RemoteInvocation
objects.
Provides a "remoteInvocationExecutor" property, with a
DefaultRemoteInvocationExecutor
as default strategy.
RemoteInvocationExecutor
,
DefaultRemoteInvocationExecutor
logger
Constructor and Description |
---|
RemoteInvocationBasedExporter() |
Modifier and Type | Method and Description |
---|---|
RemoteInvocationExecutor |
getRemoteInvocationExecutor()
Return the RemoteInvocationExecutor used by this exporter.
|
protected java.lang.Object |
invoke(RemoteInvocation invocation,
java.lang.Object targetObject)
Apply the given remote invocation to the given target object.
|
protected RemoteInvocationResult |
invokeAndCreateResult(RemoteInvocation invocation,
java.lang.Object targetObject)
Apply the given remote invocation to the given target object, wrapping
the invocation result in a serializable RemoteInvocationResult object.
|
void |
setRemoteInvocationExecutor(RemoteInvocationExecutor remoteInvocationExecutor)
Set the RemoteInvocationExecutor to use for this exporter.
|
checkService, checkServiceInterface, getExporterName, getProxyForService, getService, getServiceInterface, setInterceptors, setRegisterTraceInterceptor, setService, setServiceInterface
getBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoader
public void setRemoteInvocationExecutor(RemoteInvocationExecutor remoteInvocationExecutor)
A custom invocation executor can extract further context information from the invocation, for example user credentials.
public RemoteInvocationExecutor getRemoteInvocationExecutor()
protected java.lang.Object invoke(RemoteInvocation invocation, java.lang.Object targetObject) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
Can be overridden in subclasses for custom invocation behavior, possibly for applying additional invocation parameters from a custom RemoteInvocation subclass. Note that it is preferable to use a custom RemoteInvocationExecutor which is a reusable strategy.
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)
protected RemoteInvocationResult invokeAndCreateResult(RemoteInvocation invocation, java.lang.Object targetObject)
Can be overridden in subclasses for custom invocation behavior, for example to return additional context information. Note that this is not covered by the RemoteInvocationExecutor strategy!
invocation
- the remote invocationtargetObject
- the target object to apply the invocation toinvoke(org.springframework.remoting.support.RemoteInvocation, java.lang.Object)