public class GlobalMulticaster extends Object implements org.springframework.context.event.ApplicationEventMulticaster, org.springframework.beans.factory.BeanFactoryAware
ApplicationEventMulticaster
which can be used to integrate
parent and child OmeroContext
instances. A singleton, this instance
will delegate all method calls to a single static SimpleApplicationEventMulticaster
.Constructor and Description |
---|
GlobalMulticaster()
Keeps track of which instance this is.
|
Modifier and Type | Method and Description |
---|---|
void |
addApplicationListener(org.springframework.context.ApplicationListener arg0)
Add a listener to be notified of all events.
|
void |
addApplicationListenerBean(String arg0)
Add a listener bean to be notified of all events.
|
void |
multicastEvent(org.springframework.context.ApplicationEvent arg0)
Multicast only if this instance was the first created.
|
void |
removeAllListeners()
Remove all listeners registered with this multicaster.
|
void |
removeApplicationListener(org.springframework.context.ApplicationListener arg0)
Remove a listener from the notification list.
|
void |
removeApplicationListenerBean(String arg0)
Remove a listener bean from the notification list.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
|
public GlobalMulticaster()
multicastEvent(ApplicationEvent)
, but all
instances cann add to the static list of
listeners
.public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
org.springframework.beans.factory.BeanFactoryAware
Invoked after the population of normal bean properties
but before an initialization callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method.
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
beanFactory
- owning BeanFactory (never null
).
The bean can immediately call methods on the factory.org.springframework.beans.BeansException
- in case of initialization errorsBeanInitializationException
public void addApplicationListener(org.springframework.context.ApplicationListener arg0)
org.springframework.context.event.ApplicationEventMulticaster
addApplicationListener
in interface org.springframework.context.event.ApplicationEventMulticaster
arg0
- the listener to addpublic void multicastEvent(org.springframework.context.ApplicationEvent arg0)
multicastEvent
in interface org.springframework.context.event.ApplicationEventMulticaster
arg0
- the event to multicastpublic void removeAllListeners()
org.springframework.context.event.ApplicationEventMulticaster
After a remove call, the multicaster will perform no action on event notification until new listeners are being registered.
removeAllListeners
in interface org.springframework.context.event.ApplicationEventMulticaster
public void removeApplicationListener(org.springframework.context.ApplicationListener arg0)
org.springframework.context.event.ApplicationEventMulticaster
removeApplicationListener
in interface org.springframework.context.event.ApplicationEventMulticaster
arg0
- the listener to removepublic void addApplicationListenerBean(String arg0)
org.springframework.context.event.ApplicationEventMulticaster
addApplicationListenerBean
in interface org.springframework.context.event.ApplicationEventMulticaster
arg0
- the name of the listener bean to addpublic void removeApplicationListenerBean(String arg0)
org.springframework.context.event.ApplicationEventMulticaster
removeApplicationListenerBean
in interface org.springframework.context.event.ApplicationEventMulticaster
arg0
- the name of the listener bean to add
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.