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.BeanFactoryAware
GlobalApplicationEventMulticaster
which can be used to integrate parent and childOmeroContext
instances. 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 void
addApplicationListener(org.springframework.context.ApplicationListener arg0)
void
addApplicationListenerBean(java.lang.String arg0)
void
multicastEvent(org.springframework.context.ApplicationEvent arg0)
Multicast only if this instance was the first created.void
multicastEvent(org.springframework.context.ApplicationEvent event, org.springframework.core.ResolvableType eventType)
void
removeAllListeners()
void
removeApplicationListener(org.springframework.context.ApplicationListener arg0)
void
removeApplicationListenerBean(java.lang.String arg0)
void
setBeanFactory(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:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
- Throws:
org.springframework.beans.BeansException
-
addApplicationListener
public void addApplicationListener(org.springframework.context.ApplicationListener arg0)
- Specified by:
addApplicationListener
in 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:
multicastEvent
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent event, org.springframework.core.ResolvableType eventType)
- Specified by:
multicastEvent
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeAllListeners
public void removeAllListeners()
- Specified by:
removeAllListeners
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListener
public void removeApplicationListener(org.springframework.context.ApplicationListener arg0)
- Specified by:
removeApplicationListener
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
addApplicationListenerBean
public void addApplicationListenerBean(java.lang.String arg0)
- Specified by:
addApplicationListenerBean
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBean
public void removeApplicationListenerBean(java.lang.String arg0)
- Specified by:
removeApplicationListenerBean
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
-