spring-context

org.springframework.remoting.support
Class RemotingSupport

java.lang.Object
  extended by org.springframework.remoting.support.RemotingSupport
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware
Direct Known Subclasses:
RemoteAccessor, RemoteExporter

public abstract class RemotingSupport
extends java.lang.Object
implements org.springframework.beans.factory.BeanClassLoaderAware

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

Since:
2.5.2
Author:
Juergen Hoeller

Field Summary
protected  org.apache.commons.logging.Log logger
          Logger available to subclasses
 
Constructor Summary
RemotingSupport()
           
 
Method Summary
protected  java.lang.ClassLoader getBeanClassLoader()
          Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.
protected  java.lang.ClassLoader overrideThreadContextClassLoader()
          Override the thread context ClassLoader with the environment's bean ClassLoader if necessary, i.e.
protected  void resetThreadContextClassLoader(java.lang.ClassLoader original)
          Reset the original thread context ClassLoader if necessary.
 void setBeanClassLoader(java.lang.ClassLoader classLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Logger available to subclasses

Constructor Detail

RemotingSupport

public RemotingSupport()
Method Detail

setBeanClassLoader

public void setBeanClassLoader(java.lang.ClassLoader classLoader)
Specified by:
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware

getBeanClassLoader

protected java.lang.ClassLoader getBeanClassLoader()
Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.


overrideThreadContextClassLoader

protected java.lang.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

resetThreadContextClassLoader

protected void resetThreadContextClassLoader(java.lang.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)

spring-context