Class 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
    Global 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.
    See Also:
    OmeroContext, OmeroContext.publishEvent(ApplicationEvent), OmeroContext.onRefresh()
    • Constructor Detail

      • GlobalMulticaster

        public GlobalMulticaster()
        Keeps track of which instance this is. Only the first instance will actively call multicastEvent(ApplicationEvent), but all instances cann add to the static list of listeners.
    • Method Detail

      • setBeanFactory

        public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
        Specified by:
        setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
        Throws:
        org.springframework.beans.BeansException
      • addApplicationListener

        public void addApplicationListener​(org.springframework.context.ApplicationListener arg0)
        Specified by:
        addApplicationListener in interface org.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 interface org.springframework.context.event.ApplicationEventMulticaster
      • multicastEvent

        public void multicastEvent​(org.springframework.context.ApplicationEvent event,
                                   org.springframework.core.ResolvableType eventType)
        Specified by:
        multicastEvent in interface org.springframework.context.event.ApplicationEventMulticaster
      • removeAllListeners

        public void removeAllListeners()
        Specified by:
        removeAllListeners in interface org.springframework.context.event.ApplicationEventMulticaster
      • removeApplicationListener

        public void removeApplicationListener​(org.springframework.context.ApplicationListener arg0)
        Specified by:
        removeApplicationListener in interface org.springframework.context.event.ApplicationEventMulticaster
      • addApplicationListenerBean

        public void addApplicationListenerBean​(java.lang.String arg0)
        Specified by:
        addApplicationListenerBean in interface org.springframework.context.event.ApplicationEventMulticaster
      • removeApplicationListenerBean

        public void removeApplicationListenerBean​(java.lang.String arg0)
        Specified by:
        removeApplicationListenerBean in interface org.springframework.context.event.ApplicationEventMulticaster