Class EventPublisherAspectRegistration
java.lang.Object
com.github._1c_syntax.bsl.languageserver.aop.EventPublisherAspectRegistration
- All Implemented Interfaces:
Aware, ApplicationContextAware
@Component
public class EventPublisherAspectRegistration
extends Object
implements ApplicationContextAware
Регистратор
EventPublisherAspect для каждого Spring-контекста.
Поскольку EventPublisherAspect является синглтоном AspectJ CTW — один экземпляр на всю JVM —
каждый Spring-контекст создаёт свой экземпляр этого @Component.
При инициализации бина ApplicationContextAware.setApplicationContext(ApplicationContext) вызывается Spring-ом
с тем контекстом, которому принадлежит бин (строгий контракт Spring). Бин регистрирует свой контекст
в аспекте. При уничтожении контекста PreDestroy гарантированно отменяет регистрацию,
не затрагивая остальные живые контексты.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EventPublisherAspectRegistration
@ConstructorProperties("aspect") public EventPublisherAspectRegistration(EventPublisherAspect aspect)
-
-
Method Details
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware
-
destroy
-