Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ProxyFactoryObject Class

IFactoryObject implementation to source AOP proxies from a Spring.NET IoC container (an IObjectFactory).

For a list of all members of this type, see ProxyFactoryObject Members .


[Visual Basic]
<Serializable> _
Public Class ProxyFactoryObject
    Inherits AdvisedSupport
    Implements IFactoryObject, IObjectFactoryAware
public class ProxyFactoryObject : AdvisedSupport, IFactoryObject, IObjectFactoryAware

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


IInterceptors and IAdvisors are identified by a list of object names in the current container.

Global interceptors and advisors can be added at the factory level (that is, outside the context of a ProxyFactoryObject definition). The specified interceptors and advisors are expanded in an interceptor list (see InterceptorNames) where an 'xxx*' wildcard-style entry is included in the list, matching the given prefix with the object names. For example, 'global*' would match both 'globalObject1' and 'globalObjectBar', and '*' would match all defined interceptors. The matching interceptors get applied according to their returned order value, if they implement the IOrdered interface. An interceptor name list may not conclude with a global 'xxx*' pattern, as global interceptors cannot invoke targets.

It is possible to cast a proxy obtained from this factory to an IAdvised reference, or to obtain the ProxyFactoryObject reference and programmatically manipulate it. This won't work for existing prototype references, which are independent... however, it will work for prototypes subsequently obtained from the factory. Changes to interception will work immediately on singletons (including existing references). However, to change interfaces or the target it is necessary to obtain a new instance from the surrounding container. This means that singleton instances obtained from the factory do not have the same object identity... however, they do have the same interceptors and target, and changing any reference will change all objects.


Namespace: Spring.Aop.Framework

Assembly: Spring.Aop (in Spring.Aop.dll)

See Also

ProxyFactoryObject Members | Spring.Aop.Framework Namespace | InterceptorNames | ProxyInterfaces | IMethodInterceptor | IAdvisor | SingletonTargetSource