Package com.atlassian.confluence.event
Class ConfluenceEventPublisherManager
- java.lang.Object
-
- com.atlassian.confluence.event.ConfluenceEventPublisherManager
-
- All Implemented Interfaces:
com.atlassian.event.api.EventListenerRegistrar,com.atlassian.event.api.EventPublisher,EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class ConfluenceEventPublisherManager extends Object implements com.atlassian.event.api.EventPublisher, org.springframework.context.ApplicationListener, org.springframework.context.ApplicationContextAware
Implementation of the atlassian-eventsEventPublisherfor use with an injectedEventDispatcher.
By default this will accept listeners based on the old deprecatedEventListenerimplementations or the new annotation based ones -EventListener.
This delegates toEventPublisherImpl.- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description ConfluenceEventPublisherManager(com.atlassian.event.spi.EventDispatcher eventDispatcher)Creates a ConfluenceEventPublisherManager with aListenerHandlersConfigurationcontainingLegacyListenerHandlerandAnnotatedMethodsListenerHandlerto support listeners implementingEventListenerinterface or the annotationEventListener.ConfluenceEventPublisherManager(com.atlassian.event.spi.EventDispatcher eventDispatcher, com.atlassian.event.config.ListenerHandlersConfiguration listenerHandlersConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonApplicationEvent(org.springframework.context.ApplicationEvent event)voidpublish(Object o)voidregister(Object o)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidunregister(Object o)voidunregisterAll()
-
-
-
Constructor Detail
-
ConfluenceEventPublisherManager
public ConfluenceEventPublisherManager(com.atlassian.event.spi.EventDispatcher eventDispatcher, com.atlassian.event.config.ListenerHandlersConfiguration listenerHandlersConfiguration)
-
ConfluenceEventPublisherManager
public ConfluenceEventPublisherManager(com.atlassian.event.spi.EventDispatcher eventDispatcher)
Creates a ConfluenceEventPublisherManager with aListenerHandlersConfigurationcontainingLegacyListenerHandlerandAnnotatedMethodsListenerHandlerto support listeners implementingEventListenerinterface or the annotationEventListener.- Parameters:
eventDispatcher- Injected event dispatcher.
-
-
Method Detail
-
publish
public void publish(Object o)
- Specified by:
publishin interfacecom.atlassian.event.api.EventPublisher
-
register
public void register(Object o)
- Specified by:
registerin interfacecom.atlassian.event.api.EventListenerRegistrar
-
unregister
public void unregister(Object o)
- Specified by:
unregisterin interfacecom.atlassian.event.api.EventListenerRegistrar
-
unregisterAll
public void unregisterAll()
- Specified by:
unregisterAllin interfacecom.atlassian.event.api.EventListenerRegistrar
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener
-
-