Package org.apache.catalina.storeconfig
Class StoreConfigLifecycleListener
- java.lang.Object
-
- org.apache.catalina.storeconfig.StoreConfigLifecycleListener
-
- All Implemented Interfaces:
LifecycleListener
public class StoreConfigLifecycleListener extends java.lang.Object implements LifecycleListener
Loads and registers a StoreConfig MBean with the name Catalina:type=StoreConfig.This listener must only be nested within
Serverelements.
-
-
Constructor Summary
Constructors Constructor Description StoreConfigLifecycleListener()Constructs a new StoreConfigLifecycleListener with default settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateMBean(Server server)Create StoreConfig MBean and load StoreRegistry MBeans name isCatalina:type=StoreConfig.protected javax.management.DynamicMBeangetManagedBean(java.lang.Object object)Create a ManagedBean (StoreConfig).IStoreConfiggetStoreConfig()Returns the store config instance.java.lang.StringgetStoreConfigClass()Returns the fully qualified class name of the StoreConfig implementation.java.lang.StringgetStoreRegistry()Returns the name of the StoreRegistry MBean.voidlifecycleEvent(LifecycleEvent event)Register StoreRegistry after Start the complete Server.voidsetStoreConfig(IStoreConfig storeConfig)Sets the store config instance.voidsetStoreConfigClass(java.lang.String storeConfigClass)Sets the fully qualified class name of the StoreConfig implementation.voidsetStoreRegistry(java.lang.String storeRegistry)Sets the name of the StoreRegistry MBean.
-
-
-
Field Detail
-
registry
protected final Registry registry
The configuration information registry for our managed beans.
-
-
Method Detail
-
lifecycleEvent
public void lifecycleEvent(LifecycleEvent event)
Register StoreRegistry after Start the complete Server.- Specified by:
lifecycleEventin interfaceLifecycleListener- 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 isCatalina:type=StoreConfig.- Parameters:
server- The Server instance
-
getManagedBean
protected javax.management.DynamicMBean getManagedBean(java.lang.Object object) throws java.lang.ExceptionCreate a ManagedBean (StoreConfig).- Parameters:
object- The object to manage- Returns:
- an MBean wrapping the object
- Throws:
java.lang.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 java.lang.String getStoreConfigClass()
Returns the fully qualified class name of the StoreConfig implementation.- Returns:
- the main store config class name
-
setStoreConfigClass
public void setStoreConfigClass(java.lang.String storeConfigClass)
Sets the fully qualified class name of the StoreConfig implementation.- Parameters:
storeConfigClass- The storeConfigClass to set.
-
getStoreRegistry
public java.lang.String getStoreRegistry()
Returns the name of the StoreRegistry MBean.- Returns:
- the store registry
-
setStoreRegistry
public void setStoreRegistry(java.lang.String storeRegistry)
Sets the name of the StoreRegistry MBean.- Parameters:
storeRegistry- The storeRegistry to set.
-
-