类 RemoteInvocationBasedExporter
- java.lang.Object
- org.springframework.remoting.support.RemotingSupport
- org.springframework.remoting.support.RemoteExporter
- org.springframework.remoting.support.RemoteInvocationBasedExporter
- 所有已实现的接口:
Aware
,BeanClassLoaderAware
public abstract class RemoteInvocationBasedExporter extends RemoteExporter
Abstract base class for remote service exporters that are based on deserialization ofRemoteInvocation
objects.Provides a "remoteInvocationExecutor" property, with a
DefaultRemoteInvocationExecutor
as default strategy.- 从以下版本开始:
- 1.1
- 作者:
- Juergen Hoeller
- 另请参阅:
RemoteInvocationExecutor
,DefaultRemoteInvocationExecutor
字段概要
从类继承的字段 org.springframework.remoting.support.RemotingSupport
logger
构造器概要
构造器 构造器 说明 RemoteInvocationBasedExporter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 org.springframework.remoting.support.RemoteExporter
checkService, checkServiceInterface, getExporterName, getProxyForService, getService, getServiceInterface, setInterceptors, setRegisterTraceInterceptor, setService, setServiceInterface
从类继承的方法 org.springframework.remoting.support.RemotingSupport
getBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoader
构造器详细资料
RemoteInvocationBasedExporter
public RemoteInvocationBasedExporter()
方法详细资料
setRemoteInvocationExecutor
public void setRemoteInvocationExecutor(RemoteInvocationExecutor remoteInvocationExecutor)
Set the RemoteInvocationExecutor to use for this exporter. Default is a DefaultRemoteInvocationExecutor.A custom invocation executor can extract further context information from the invocation, for example user credentials.
getRemoteInvocationExecutor
public RemoteInvocationExecutor getRemoteInvocationExecutor()
Return the RemoteInvocationExecutor used by this exporter.
invoke
protected Object invoke(RemoteInvocation invocation, Object targetObject) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
Apply the given remote invocation to the given target object. The default implementation delegates to the RemoteInvocationExecutor.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 to- 返回:
- the invocation result
- 抛出:
NoSuchMethodException
- if the method name could not be resolvedIllegalAccessException
- if the method could not be accessedInvocationTargetException
- if the method invocation resulted in an exception- 另请参阅:
RemoteInvocationExecutor.invoke(org.springframework.remoting.support.RemoteInvocation, java.lang.Object)
invokeAndCreateResult
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. The default implementation creates a plain RemoteInvocationResult.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 to- 返回:
- the invocation result
- 另请参阅:
invoke(org.springframework.remoting.support.RemoteInvocation, java.lang.Object)