org.springframework.web.context.support

## Class ServletContextLiveBeansView

- java.lang.Object
- - org.springframework.context.support.LiveBeansView
  - - org.springframework.web.context.support.ServletContextLiveBeansView

- All Implemented Interfaces:
    Aware, ApplicationContextAware, LiveBeansViewMBean

      public class ServletContextLiveBeansView
      extends LiveBeansView

  `LiveBeansView` subclass which looks for all ApplicationContexts in the web application, as exposed in ServletContext attributes.
  Since:
    3.2
  Author:
    Juergen Hoeller

- - ### Field Summary

    - ### Fields inherited from class org.springframework.context.support.LiveBeansView

      `MBEAN_APPLICATION_KEY, MBEAN_DOMAIN_PROPERTY_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServletContextLiveBeansView(ServletContext servletContext)` Create a new LiveBeansView for the given ServletContext.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Set<ConfigurableApplicationContext>` | `findApplicationContexts()` Find all applicable ApplicationContexts for the current application.

    - ### Methods inherited from class org.springframework.context.support.LiveBeansView

      `generateJson, getSnapshotAsJson, isBeanEligible, setApplicationContext`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### ServletContextLiveBeansView

          public ServletContextLiveBeansView(ServletContext servletContext)

      Create a new LiveBeansView for the given ServletContext.
      Parameters:
        `servletContext` - current ServletContext

  - ### Method Detail

    - #### findApplicationContexts

          protected Set<ConfigurableApplicationContext> findApplicationContexts()

      Description copied from class: `LiveBeansView`
      Find all applicable ApplicationContexts for the current application.

      Called if no specific ApplicationContext has been set for this LiveBeansView.

      Overrides:
        `findApplicationContexts` in class `LiveBeansView`
      Returns:
        the set of ApplicationContexts