public abstract class

RemotingSupport

extends Object
implements BeanClassLoaderAware
java.lang.Object
   ↳ org.springframework.remoting.support.RemotingSupport
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Generic support base class for remote accessor and exporters, providing common bean ClassLoader handling.

Summary

Fields
protected final Log logger Logger available to subclasses
Public Constructors
RemotingSupport()
Public Methods
void setBeanClassLoader(ClassLoader classLoader)
Callback that supplies the bean class loader to a bean instance.
Protected Methods
ClassLoader getBeanClassLoader()
Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.
ClassLoader overrideThreadContextClassLoader()
Override the thread context ClassLoader with the environment's bean ClassLoader if necessary, i.e.
void resetThreadContextClassLoader(ClassLoader original)
Reset the original thread context ClassLoader if necessary.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.beans.factory.BeanClassLoaderAware

Fields

protected final Log logger

Logger available to subclasses

Public Constructors

public RemotingSupport ()

Public Methods

public void setBeanClassLoader (ClassLoader classLoader)

Callback that supplies the bean class loader to a bean instance.

Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean's afterPropertiesSet() method or a custom init-method.

Parameters
classLoader the owning class loader; may be null in which case a default ClassLoader must be used, for example the ClassLoader obtained via getDefaultClassLoader()

Protected Methods

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.

Returns
  • the original thread context ClassLoader, or null if not overridden

protected void resetThreadContextClassLoader (ClassLoader original)

Reset the original thread context ClassLoader if necessary.

Parameters
original the original thread context ClassLoader, or null if not overridden (and hence nothing to reset)