类 RemoteInvocationBasedAccessor
- java.lang.Object
- org.springframework.remoting.support.RemotingSupport
- org.springframework.remoting.support.RemoteAccessor
- org.springframework.remoting.support.UrlBasedRemoteAccessor
- org.springframework.remoting.support.RemoteInvocationBasedAccessor
- 所有已实现的接口:
Aware
,BeanClassLoaderAware
,InitializingBean
public abstract class RemoteInvocationBasedAccessor extends UrlBasedRemoteAccessor
Abstract base class for remote service accessors that are based on serialization ofRemoteInvocation
objects. Provides a "remoteInvocationFactory" property, with aDefaultRemoteInvocationFactory
as default strategy.- 从以下版本开始:
- 1.1
- 作者:
- Juergen Hoeller
- 另请参阅:
setRemoteInvocationFactory(org.springframework.remoting.support.RemoteInvocationFactory)
,RemoteInvocation
,RemoteInvocationFactory
,DefaultRemoteInvocationFactory
字段概要
从类继承的字段 org.springframework.remoting.support.RemotingSupport
logger
构造器概要
构造器 构造器 说明 RemoteInvocationBasedAccessor()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected RemoteInvocation
createRemoteInvocation(MethodInvocation methodInvocation)
Create a new RemoteInvocation object for the given AOP method invocation.RemoteInvocationFactory
getRemoteInvocationFactory()
Return the RemoteInvocationFactory used by this accessor.protected Object
recreateRemoteInvocationResult(RemoteInvocationResult result)
Recreate the invocation result contained in the given RemoteInvocationResult object.void
setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)
Set the RemoteInvocationFactory to use for this accessor.从类继承的方法 org.springframework.remoting.support.UrlBasedRemoteAccessor
afterPropertiesSet, getServiceUrl, setServiceUrl
从类继承的方法 org.springframework.remoting.support.RemoteAccessor
getServiceInterface, setServiceInterface
从类继承的方法 org.springframework.remoting.support.RemotingSupport
getBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoader
构造器详细资料
RemoteInvocationBasedAccessor
public RemoteInvocationBasedAccessor()
方法详细资料
setRemoteInvocationFactory
public void setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)
Set the RemoteInvocationFactory to use for this accessor. Default is aDefaultRemoteInvocationFactory
.A custom invocation factory can add further context information to the invocation, for example user credentials.
getRemoteInvocationFactory
public RemoteInvocationFactory getRemoteInvocationFactory()
Return the RemoteInvocationFactory used by this accessor.
createRemoteInvocation
protected RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation)
Create a new RemoteInvocation object for the given AOP method invocation.The default implementation delegates to the configured
RemoteInvocationFactory
. This can be overridden in subclasses in order to provide custom RemoteInvocation subclasses, containing additional invocation parameters (e.g. user credentials).Note that it is preferable to build a custom RemoteInvocationFactory as a reusable strategy, instead of overriding this method.
- 参数:
methodInvocation
- the current AOP method invocation- 返回:
- the RemoteInvocation object
- 另请参阅:
RemoteInvocationFactory.createRemoteInvocation(org.aopalliance.intercept.MethodInvocation)
recreateRemoteInvocationResult
protected Object recreateRemoteInvocationResult(RemoteInvocationResult result) throws Throwable
Recreate the invocation result contained in the given RemoteInvocationResult object.The default implementation calls the default
recreate()
method. This can be overridden in subclass to provide custom recreation, potentially processing the returned result object.- 参数:
result
- the RemoteInvocationResult to recreate- 返回:
- a return value if the invocation result is a successful return
- 抛出:
Throwable
- if the invocation result is an exception- 另请参阅:
RemoteInvocationResult.recreate()