Class SleuthContextListener

java.lang.Object
org.springframework.cloud.sleuth.internal.SleuthContextListener
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, org.springframework.context.event.SmartApplicationListener, org.springframework.core.Ordered

public class SleuthContextListener extends Object implements org.springframework.context.event.SmartApplicationListener
Internal tool used by Sleuth. Do not use.
Since:
2.2.5
Author:
Marcin Grzejszczak
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getBean(org.springframework.beans.factory.BeanFactory beanFactory)
    Returns an instance of the SleuthContextListener that might have already been initialized.
    boolean
    Verifies if context is unusable.
    void
    onApplicationEvent(org.springframework.context.ApplicationEvent event)
     
    boolean
    supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.context.event.SmartApplicationListener

    getListenerId, getOrder, supportsSourceType
  • Constructor Details

    • SleuthContextListener

      public SleuthContextListener()
  • Method Details

    • getBean

      public static SleuthContextListener getBean(org.springframework.beans.factory.BeanFactory beanFactory)
      Returns an instance of the SleuthContextListener that might have already been initialized.
      Parameters:
      beanFactory - bean factory
      Returns:
      instance of SleuthContextListener
    • supportsEventType

      public boolean supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType)
      Specified by:
      supportsEventType in interface org.springframework.context.event.SmartApplicationListener
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
    • isUnusable

      public boolean isUnusable()
      Verifies if context is unusable.
      Returns:
      true when Spring Context has NOT yet been started