Interface ApplicationRuntime

All Known Implementing Classes:
SpringBootApplicationRuntime

public interface ApplicationRuntime
Abstraction of the application runtime environment. Primarily to keep references to Spring Boot out of the core observability implementation.
Author:
Oliver Drotbohm
  • Method Details

    • of

      Creates a new ApplicationRuntime for the given ApplicationContext.
      Parameters:
      context - must not be null.
      Returns:
      will never be null.
    • getId

      String getId()
      Returns the identifier of the application.
      Returns:
      will never be null.
    • getMainApplicationClass

      Class<?> getMainApplicationClass()
      Returns the primary application class.
      Returns:
      will never be null.
    • getUserClass

      Class<?> getUserClass(Object bean, String beanName)
      Obtain the end user class for the given bean and bean name. Necessary to reveal the actual user type from potentially proxied instances.
      Parameters:
      bean - must not be null.
      beanName - must not be null or empty.
      Returns:
      will never be null.
    • isApplicationClass

      boolean isApplicationClass(Class<?> type)
      Returns whether the given type is an application class, i.e. user code in one of the application packages.
      Parameters:
      type - must not be null.
      Returns:
      whether the given type is an application class, i.e. user code in one of the application packages.