类 RemotingSupport
- java.lang.Object
- org.springframework.remoting.support.RemotingSupport
- 所有已实现的接口:
Aware
,BeanClassLoaderAware
- 直接已知子类:
RemoteAccessor
,RemoteExporter
public abstract class RemotingSupport extends Object implements BeanClassLoaderAware
Generic support base class for remote accessor and exporters, providing common bean ClassLoader handling.- 从以下版本开始:
- 2.5.2
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 RemotingSupport()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected ClassLoader
getBeanClassLoader()
Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.protected ClassLoader
overrideThreadContextClassLoader()
Override the thread context ClassLoader with the environment's bean ClassLoader if necessary, i.e. if the bean ClassLoader is not equivalent to the thread context ClassLoader already.protected void
resetThreadContextClassLoader(ClassLoader original)
Reset the original thread context ClassLoader if necessary.void
setBeanClassLoader(ClassLoader classLoader)
Callback that supplies the beanclass loader
to a bean instance.
构造器详细资料
RemotingSupport
public RemotingSupport()
方法详细资料
setBeanClassLoader
public void setBeanClassLoader(ClassLoader classLoader)
从接口复制的说明:BeanClassLoaderAware
Callback that supplies the beanclass loader
to a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean's
InitializingBean.afterPropertiesSet()
method or a custom init-method.- 指定者:
setBeanClassLoader
在接口中BeanClassLoaderAware
- 参数:
classLoader
- the owning class loader; may benull
in which case a defaultClassLoader
must be used, for example theClassLoader
obtained viaClassUtils.getDefaultClassLoader()
getBeanClassLoader
protected ClassLoader getBeanClassLoader()
Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.
overrideThreadContextClassLoader
protected ClassLoader overrideThreadContextClassLoader()
Override the thread context ClassLoader with the environment's bean ClassLoader if necessary, i.e. if the bean ClassLoader is not equivalent to the thread context ClassLoader already.- 返回:
- the original thread context ClassLoader, or
null
if not overridden
resetThreadContextClassLoader
protected void resetThreadContextClassLoader(ClassLoader original)
Reset the original thread context ClassLoader if necessary.- 参数:
original
- the original thread context ClassLoader, ornull
if not overridden (and hence nothing to reset)