org.apache.catalina.storeconfig

## 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 should only be used with a `Server`.

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StoreConfigLifecycleListener()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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()`
    `String` | `getStoreConfigClass()`
    `String` | `getStoreRegistry()`
    `void` | `lifecycleEvent(LifecycleEvent event)` Register StoreRegistry after Start the complete Server.
    `void` | `setStoreConfig(IStoreConfig storeConfig)`
    `void` | `setStoreConfigClass(String storeConfigClass)`
    `void` | `setStoreRegistry(String storeRegistry)`

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

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

- - ### Field Detail

    - #### registry

          protected final Registry registry

      The configuration information registry for our managed beans.

  - ### Constructor Detail

    - #### StoreConfigLifecycleListener

          public StoreConfigLifecycleListener()

  - ### Method Detail

    - #### 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

    - #### setStoreConfig

          public void setStoreConfig(IStoreConfig storeConfig)

      Parameters:
        `storeConfig` - The storeConfig to set.

    - #### getStoreConfigClass

          public String getStoreConfigClass()

      Returns:
        the main store config class name

    - #### setStoreConfigClass

          public void setStoreConfigClass(String storeConfigClass)

      Parameters:
        `storeConfigClass` - The storeConfigClass to set.

    - #### getStoreRegistry

          public String getStoreRegistry()

      Returns:
        the store registry

    - #### setStoreRegistry

          public void setStoreRegistry(String storeRegistry)

      Parameters:
        `storeRegistry` - The storeRegistry to set.

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.