spring-framework / org.springframework.aop.scope

Package org.springframework.aop.scope

Types

DefaultScopedObject

open class DefaultScopedObject : ScopedObject, Serializable

Default implementation of the ScopedObject interface.

Simply delegates the calls to the underlying ConfigurableBeanFactory (ConfigurableBeanFactory#getBean(String)/ ConfigurableBeanFactory#destroyScopedBean(String)).

ScopedObject

interface ScopedObject : RawTargetAccess

An AOP introduction interface for scoped objects.

Objects created from the ScopedProxyFactoryBean can be cast to this interface, enabling access to the raw target object and programmatic removal of the target object.

ScopedProxyFactoryBean

open class ScopedProxyFactoryBean : ProxyConfig, FactoryBean<Any>, BeanFactoryAware

Convenient proxy factory bean for scoped objects.

Proxies created using this factory bean are thread-safe singletons and may be injected into shared objects, with transparent scoping behavior.

Proxies returned by this class implement the ScopedObject interface. This presently allows for removing the corresponding object from the scope, seamlessly creating a new instance in the scope on next access.

Please note that the proxies created by this factory are class-based proxies by default. This can be customized through switching the "proxyTargetClass" property to "false".

ScopedProxyUtils

abstract class ScopedProxyUtils

Utility class for creating a scoped proxy. Used by ScopedProxyBeanDefinitionDecorator and ClassPathBeanDefinitionScanner.