com.atlassian.confluence.event
Class ConfluenceEventPublisherManager

java.lang.Object
  extended by com.atlassian.confluence.event.ConfluenceEventPublisherManager
All Implemented Interfaces:
com.atlassian.event.api.EventPublisher, EventListener, 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-events EventPublisher for use with an injected EventDispatcher.

By default this will accept listeners based on the old deprecated EventListener implementations or the new annotation based ones - EventListener.

This delegates to EventPublisherImpl.

Since:
3.3

Constructor Summary
ConfluenceEventPublisherManager(com.atlassian.event.spi.EventDispatcher eventDispatcher)
          Creates a ConfluenceEventPublisherManager with a ListenerHandlersConfiguration containing LegacyListenerHandler and AnnotatedMethodsListenerHandler to support listeners implementing EventListener interface or the annotation EventListener.
ConfluenceEventPublisherManager(com.atlassian.event.spi.EventDispatcher eventDispatcher, com.atlassian.event.config.ListenerHandlersConfiguration listenerHandlersConfiguration)
           
 
Method Summary
 void onApplicationEvent(org.springframework.context.ApplicationEvent event)
           
 void publish(Object o)
           
 void register(Object o)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void unregister(Object o)
           
 void unregisterAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 a ListenerHandlersConfiguration containing LegacyListenerHandler and AnnotatedMethodsListenerHandler to support listeners implementing EventListener interface or the annotation EventListener.

Parameters:
eventDispatcher - Injected event dispatcher.
Method Detail

publish

public void publish(Object o)
Specified by:
publish in interface com.atlassian.event.api.EventPublisher

register

public void register(Object o)
Specified by:
register in interface com.atlassian.event.api.EventPublisher

unregister

public void unregister(Object o)
Specified by:
unregister in interface com.atlassian.event.api.EventPublisher

unregisterAll

public void unregisterAll()
Specified by:
unregisterAll in interface com.atlassian.event.api.EventPublisher

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener


Copyright © 2003-2012 Atlassian. All Rights Reserved.