类 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 ClassLoadergetBeanClassLoader()Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.protected ClassLoaderoverrideThreadContextClassLoader()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 voidresetThreadContextClassLoader(ClassLoader original)Reset the original thread context ClassLoader if necessary.voidsetBeanClassLoader(ClassLoader classLoader)Callback that supplies the beanclass loaderto a bean instance.
构造器详细资料
RemotingSupport
public RemotingSupport()
方法详细资料
setBeanClassLoader
public void setBeanClassLoader(ClassLoader classLoader)
从接口复制的说明:BeanClassLoaderAwareCallback that supplies the beanclass loaderto a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean'sInitializingBean.afterPropertiesSet()method or a custom init-method.- 指定者:
setBeanClassLoader在接口中BeanClassLoaderAware- 参数:
classLoader- the owning class loader
getBeanClassLoader
protected ClassLoader getBeanClassLoader()
Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.
overrideThreadContextClassLoader
@Nullable 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
nullif not overridden
resetThreadContextClassLoader
protected void resetThreadContextClassLoader(@Nullable ClassLoader original)
Reset the original thread context ClassLoader if necessary.- 参数:
original- the original thread context ClassLoader, ornullif not overridden (and hence nothing to reset)