public class ProxyProcessorSupport extends ProxyConfig implements Ordered, BeanClassLoaderAware, AopInfrastructureBean
evaluateProxyInterfaces(java.lang.Class<?>, org.springframework.aop.framework.ProxyFactory)
algorithm.AbstractAdvisingBeanPostProcessor
,
AbstractAutoProxyCreator
,
Serialized FormHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
ProxyProcessorSupport() |
Modifier and Type | Method and Description |
---|---|
protected void |
evaluateProxyInterfaces(Class<?> beanClass,
ProxyFactory proxyFactory)
Check the interfaces on the given bean class and apply them to the
ProxyFactory ,
if appropriate. |
int |
getOrder()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
protected ClassLoader |
getProxyClassLoader()
Return the configured proxy ClassLoader for this processor.
|
protected boolean |
isConfigurationCallbackInterface(Class<?> ifc)
Determine whether the given interface is just a container callback and
therefore not to be considered as a reasonable proxy interface.
|
protected boolean |
isInternalLanguageInterface(Class<?> ifc)
Determine whether the given interface is a well-known internal language interface
and therefore not to be considered as a reasonable proxy interface.
|
void |
setBeanClassLoader(ClassLoader classLoader)
Callback that supplies the bean
class loader to
a bean instance. |
void |
setOrder(int order)
Set the ordering which will apply to this class's implementation
of Ordered, used when applying multiple processors.
|
void |
setProxyClassLoader(ClassLoader classLoader)
Set the ClassLoader to generate the proxy class in.
|
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString
public void setOrder(int order)
Default value is Integer.MAX_VALUE
, meaning that it's non-ordered.
order
- the ordering valuepublic int getOrder()
Ordered
Normally starting with 0, with Integer.MAX_VALUE
indicating the greatest value. Same order values will result
in arbitrary positions for the affected objects.
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).
public void setProxyClassLoader(ClassLoader classLoader)
Default is the bean ClassLoader, i.e. the ClassLoader used by the containing
BeanFactory
for loading all bean classes.
This can be overridden here for specific proxies.
protected ClassLoader getProxyClassLoader()
public void setBeanClassLoader(ClassLoader classLoader)
BeanClassLoaderAware
class 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
in interface BeanClassLoaderAware
classLoader
- the owning class loader; may be null
in
which case a default ClassLoader
must be used, for example
the ClassLoader
obtained via
ClassUtils.getDefaultClassLoader()
protected void evaluateProxyInterfaces(Class<?> beanClass, ProxyFactory proxyFactory)
ProxyFactory
,
if appropriate.
Calls isConfigurationCallbackInterface(java.lang.Class<?>)
and isInternalLanguageInterface(java.lang.Class<?>)
to filter for reasonable proxy interfaces, falling back to a target-class proxy otherwise.
beanClass
- the class of the beanproxyFactory
- the ProxyFactory for the beanprotected boolean isConfigurationCallbackInterface(Class<?> ifc)
If no reasonable proxy interface is found for a given bean, it will get proxied with its full target class, assuming that as the user's intention.
ifc
- the interface to checkprotected boolean isInternalLanguageInterface(Class<?> ifc)
If no reasonable proxy interface is found for a given bean, it will get proxied with its full target class, assuming that as the user's intention.
ifc
- the interface to check