Package ome.services.messages
Class GlobalMulticaster
- java.lang.Object
-
- ome.services.messages.GlobalMulticaster
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.context.event.ApplicationEventMulticaster
public class GlobalMulticaster extends java.lang.Object implements org.springframework.context.event.ApplicationEventMulticaster, org.springframework.beans.factory.BeanFactoryAwareGlobalApplicationEventMulticasterwhich can be used to integrate parent and childOmeroContextinstances. A singleton, this instance will delegate all method calls to a single staticSimpleApplicationEventMulticaster.- See Also:
OmeroContext,OmeroContext.publishEvent(ApplicationEvent),OmeroContext.onRefresh()
-
-
Constructor Summary
Constructors Constructor Description GlobalMulticaster()Keeps track of which instance this is.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddApplicationListener(org.springframework.context.ApplicationListener arg0)voidaddApplicationListenerBean(java.lang.String arg0)voidmulticastEvent(org.springframework.context.ApplicationEvent arg0)Multicast only if this instance was the first created.voidmulticastEvent(org.springframework.context.ApplicationEvent event, org.springframework.core.ResolvableType eventType)voidremoveAllListeners()voidremoveApplicationListener(org.springframework.context.ApplicationListener arg0)voidremoveApplicationListenerBean(java.lang.String arg0)voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
-
-
Constructor Detail
-
GlobalMulticaster
public GlobalMulticaster()
Keeps track of which instance this is. Only the first instance will actively callmulticastEvent(ApplicationEvent), but all instances cann add to the static list oflisteners.
-
-
Method Detail
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
addApplicationListener
public void addApplicationListener(org.springframework.context.ApplicationListener arg0)
- Specified by:
addApplicationListenerin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent arg0)
Multicast only if this instance was the first created.- Specified by:
multicastEventin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent event, org.springframework.core.ResolvableType eventType)- Specified by:
multicastEventin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeAllListeners
public void removeAllListeners()
- Specified by:
removeAllListenersin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListener
public void removeApplicationListener(org.springframework.context.ApplicationListener arg0)
- Specified by:
removeApplicationListenerin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
addApplicationListenerBean
public void addApplicationListenerBean(java.lang.String arg0)
- Specified by:
addApplicationListenerBeanin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBean
public void removeApplicationListenerBean(java.lang.String arg0)
- Specified by:
removeApplicationListenerBeanin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
-