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 Object |
invoke(RemoteInvocation invocation,
Object targetObject)
Apply the given remote invocation to the given target object.
|
protected RemoteInvocationResult |
invokeAndCreateResult(RemoteInvocation invocation,
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 Object invoke(RemoteInvocation invocation, Object targetObject) throws NoSuchMethodException, IllegalAccessException, 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 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)
protected RemoteInvocationResult invokeAndCreateResult(RemoteInvocation invocation, 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)