Class TracingJmsListenerEndpointRegistry

  • All Implemented Interfaces:
    EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

    public final class TracingJmsListenerEndpointRegistry
    extends org.springframework.jms.config.JmsListenerEndpointRegistry
    This ensures listeners end up continuing the trace from MessageConsumer.receive(). Internal class for Sleuth, do not use. Its API can change at anytime. Placed under this package cause we need to use the package scoped API.
    Since:
    2.1.1
    Author:
    Marcin Grzejszczak
    • Constructor Detail

      • TracingJmsListenerEndpointRegistry

        public TracingJmsListenerEndpointRegistry​(org.springframework.jms.config.JmsListenerEndpointRegistry registry,
                                                  org.springframework.beans.factory.BeanFactory beanFactory)
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Overrides:
        setApplicationContext in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.context.event.ContextRefreshedEvent event)
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
        Overrides:
        onApplicationEvent in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • getListenerContainer

        public org.springframework.jms.listener.MessageListenerContainer getListenerContainer​(String id)
        Overrides:
        getListenerContainer in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • getListenerContainerIds

        public Set<String> getListenerContainerIds()
        Overrides:
        getListenerContainerIds in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • getListenerContainers

        public Collection<org.springframework.jms.listener.MessageListenerContainer> getListenerContainers()
        Overrides:
        getListenerContainers in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • registerListenerContainer

        public void registerListenerContainer​(org.springframework.jms.config.JmsListenerEndpoint endpoint,
                                              org.springframework.jms.config.JmsListenerContainerFactory<?> factory)
        Overrides:
        registerListenerContainer in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • createListenerContainer

        protected org.springframework.jms.listener.MessageListenerContainer createListenerContainer​(org.springframework.jms.config.JmsListenerEndpoint endpoint,
                                                                                                    org.springframework.jms.config.JmsListenerContainerFactory<?> factory)
        Overrides:
        createListenerContainer in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • getPhase

        public int getPhase()
        Specified by:
        getPhase in interface org.springframework.context.Phased
        Specified by:
        getPhase in interface org.springframework.context.SmartLifecycle
        Overrides:
        getPhase in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • start

        public void start()
        Specified by:
        start in interface org.springframework.context.Lifecycle
        Overrides:
        start in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • stop

        public void stop()
        Specified by:
        stop in interface org.springframework.context.Lifecycle
        Overrides:
        stop in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • stop

        public void stop​(Runnable callback)
        Specified by:
        stop in interface org.springframework.context.SmartLifecycle
        Overrides:
        stop in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • isRunning

        public boolean isRunning()
        Specified by:
        isRunning in interface org.springframework.context.Lifecycle
        Overrides:
        isRunning in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Overrides:
        destroy in class org.springframework.jms.config.JmsListenerEndpointRegistry
      • isAutoStartup

        public boolean isAutoStartup()
      • registerListenerContainer

        public void registerListenerContainer​(org.springframework.jms.config.JmsListenerEndpoint endpoint,
                                              org.springframework.jms.config.JmsListenerContainerFactory<?> factory,
                                              boolean startImmediately)
        Overrides:
        registerListenerContainer in class org.springframework.jms.config.JmsListenerEndpointRegistry