StoreConfigLifecycleListener (Apache Tomcat 9.0.120 API Documentation)
Description: declaration: package: org.apache.catalina.storeconfig, class: StoreConfigLifecycleListener

# Class StoreConfigLifecycleListener

java.lang.Object
org.apache.catalina.storeconfig.StoreConfigLifecycleListener

All Implemented Interfaces:
  `LifecycleListener`

public class StoreConfigLifecycleListener extends Object implements LifecycleListener
Loads and registers a StoreConfig MBean with the name Catalina:type=StoreConfig.

This listener must only be nested within `Server` elements.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final Registry`
  `registry`
  The configuration information registry for our managed beans.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StoreConfigLifecycleListener()`
  Constructs a new StoreConfigLifecycleListener with default settings.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `createMBean(Server server)`
  Create StoreConfig MBean and load StoreRegistry MBeans name is `Catalina:type=StoreConfig`.
  `protected DynamicMBean`
  `getManagedBean(Object object)`
  Create a ManagedBean (StoreConfig).
  `IStoreConfig`
  `getStoreConfig()`
  Returns the store config instance.
  `String`
  `getStoreConfigClass()`
  Returns the fully qualified class name of the StoreConfig implementation.
  `String`
  `getStoreRegistry()`
  Returns the name of the StoreRegistry MBean.
  `void`
  `lifecycleEvent(LifecycleEvent event)`
  Register StoreRegistry after Start the complete Server.
  `void`
  `setStoreConfig(IStoreConfig storeConfig)`
  Sets the store config instance.
  `void`
  `setStoreConfigClass(String storeConfigClass)`
  Sets the fully qualified class name of the StoreConfig implementation.
  `void`
  `setStoreRegistry(String storeRegistry)`
  Sets the name of the StoreRegistry MBean.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### registry

    protected final Registry registry
    The configuration information registry for our managed beans.

- ## Constructor Details

  - ### StoreConfigLifecycleListener

    public StoreConfigLifecycleListener()
    Constructs a new StoreConfigLifecycleListener with default settings.

- ## Method Details

  - ### lifecycleEvent

    public void lifecycleEvent(LifecycleEvent event)
    Register StoreRegistry after Start the complete Server.
    Specified by:
      `lifecycleEvent` in interface `LifecycleListener`
    Parameters:
      `event` - LifecycleEvent that has occurred
    See Also:
      - `LifecycleListener.lifecycleEvent(org.apache.catalina.LifecycleEvent)`

  - ### createMBean

    protected void createMBean(Server server)
    Create StoreConfig MBean and load StoreRegistry MBeans name is `Catalina:type=StoreConfig`.
    Parameters:
      `server` - The Server instance

  - ### getManagedBean

    protected DynamicMBean getManagedBean(Object object) throws Exception
    Create a ManagedBean (StoreConfig).
    Parameters:
      `object` - The object to manage
    Returns:
      an MBean wrapping the object
    Throws:
      `Exception` - if an error occurred

  - ### getStoreConfig

    public IStoreConfig getStoreConfig()
    Returns the store config instance.
    Returns:
      the store config instance

  - ### setStoreConfig

    public void setStoreConfig(IStoreConfig storeConfig)
    Sets the store config instance.
    Parameters:
      `storeConfig` - The storeConfig to set.

  - ### getStoreConfigClass

    public String getStoreConfigClass()
    Returns the fully qualified class name of the StoreConfig implementation.
    Returns:
      the main store config class name

  - ### setStoreConfigClass

    public void setStoreConfigClass(String storeConfigClass)
    Sets the fully qualified class name of the StoreConfig implementation.
    Parameters:
      `storeConfigClass` - The storeConfigClass to set.

  - ### getStoreRegistry

    public String getStoreRegistry()
    Returns the name of the StoreRegistry MBean.
    Returns:
      the store registry

  - ### setStoreRegistry

    public void setStoreRegistry(String storeRegistry)
    Sets the name of the StoreRegistry MBean.
    Parameters:
      `storeRegistry` - The storeRegistry to set.