org.apache.catalina.mbeans

Class ServerLifecycleListener

public class ServerLifecycleListener extends Object implements ContainerListener, LifecycleListener, PropertyChangeListener

Implementation of LifecycleListener that instantiates the set of MBeans associated with the components of a running instance of Catalina.

Version: $Revision: 777611 $ $Date: 2009-05-22 18:41:15 +0200 (Fri, 22 May 2009) $

Author: Craig R. McClanahan Amy Roh

Field Summary
protected Stringdescriptors
Semicolon separated list of paths containing MBean desciptor resources.
Method Summary
voidcontainerEvent(ContainerEvent event)
Handle a ContainerEvent from one of the Containers we are interested in.
protected voidcreateMBeans()
Create the MBeans that correspond to every existing node of our tree.
protected voidcreateMBeans(Connector connector)
Create the MBeans for the specified Connector and its nested components.
protected voidcreateMBeans(Context context)
Create the MBeans for the specified Context and its nested components.
protected voidcreateMBeans(ContextEnvironment environment)
Create the MBeans for the specified ContextEnvironment entry.
protected voidcreateMBeans(ContextResource resource)
Create the MBeans for the specified ContextResource entry.
protected voidcreateMBeans(ContextResourceLink resourceLink)
Create the MBeans for the specified ContextResourceLink entry.
protected voidcreateMBeans(Engine engine)
Create the MBeans for the specified Engine and its nested components.
protected voidcreateMBeans(Host host)
Create the MBeans for the specified Host and its nested components.
protected voidcreateMBeans(MBeanFactory factory)
Create the MBeans for MBeanFactory.
protected voidcreateMBeans(NamingResources resources)
Create the MBeans for the specified NamingResources and its nested components.
protected voidcreateMBeans(Server server)
Create the MBeans for the specified Server and its nested components.
protected voidcreateMBeans(Service service)
Create the MBeans for the specified Service and its nested components.
protected voiddestroyMBeans(Connector connector, Service service)
Deregister the MBeans for the specified Connector and its nested components.
protected voiddestroyMBeans(Context context)
Deregister the MBeans for the specified Context and its nested components.
protected voiddestroyMBeans(ContextEnvironment environment)
Deregister the MBeans for the specified ContextEnvironment entry.
protected voiddestroyMBeans(ContextResource resource)
Deregister the MBeans for the specified ContextResource entry.
protected voiddestroyMBeans(ContextResourceLink resourceLink)
Deregister the MBeans for the specified ContextResourceLink entry.
protected voiddestroyMBeans(Engine engine)
Deregister the MBeans for the specified Engine and its nested components.
protected voiddestroyMBeans(Host host)
Deregister the MBeans for the specified Host and its nested components.
protected voiddestroyMBeans(NamingResources resources)
Deregister the MBeans for the specified NamingResources and its nested components.
protected voiddestroyMBeans(Server server)
Deregister the MBeans for the specified Server and its related components.
protected voiddestroyMBeans(Service service)
Deregister the MBeans for the specified Service and its nested components.
StringgetDescriptors()
voidlifecycleEvent(LifecycleEvent event)
Primary entry point for startup and shutdown events.
protected voidprocessContainerAddChild(Container parent, Container child)
Process the addition of a new child Container to a parent Container.
protected voidprocessContainerPropertyChange(Container container, String propertyName, Object oldValue, Object newValue)
Process a property change event on a Container.
protected voidprocessContainerRemoveChild(Container parent, Container child)
Process the removal of a child Container from a parent Container.
protected voidprocessNamingResourcesPropertyChange(NamingResources resources, String propertyName, Object oldValue, Object newValue)
Process a property change event on a NamingResources.
protected voidprocessServerPropertyChange(Server server, String propertyName, Object oldValue, Object newValue)
Process a property change event on a Server.
protected voidprocessServicePropertyChange(Service service, String propertyName, Object oldValue, Object newValue)
Process a property change event on a Service.
voidpropertyChange(PropertyChangeEvent event)
Handle a PropertyChangeEvent from one of the Containers we are interested in.
voidsetDescriptors(String descriptors)

Field Detail

descriptors

protected String descriptors
Semicolon separated list of paths containing MBean desciptor resources.

Method Detail

containerEvent

public void containerEvent(ContainerEvent event)
Handle a ContainerEvent from one of the Containers we are interested in.

Parameters: event The event that has occurred

createMBeans

protected void createMBeans()
Create the MBeans that correspond to every existing node of our tree.

createMBeans

protected void createMBeans(Connector connector)
Create the MBeans for the specified Connector and its nested components.

Parameters: connector Connector for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(Context context)
Create the MBeans for the specified Context and its nested components.

Parameters: context Context for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(ContextEnvironment environment)
Create the MBeans for the specified ContextEnvironment entry.

Parameters: environment ContextEnvironment for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(ContextResource resource)
Create the MBeans for the specified ContextResource entry.

Parameters: resource ContextResource for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(ContextResourceLink resourceLink)
Create the MBeans for the specified ContextResourceLink entry.

Parameters: resourceLink ContextResourceLink for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(Engine engine)
Create the MBeans for the specified Engine and its nested components.

Parameters: engine Engine for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(Host host)
Create the MBeans for the specified Host and its nested components.

Parameters: host Host for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(MBeanFactory factory)
Create the MBeans for MBeanFactory.

Parameters: factory MBeanFactory for which to create MBean

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(NamingResources resources)
Create the MBeans for the specified NamingResources and its nested components.

Parameters: resources NamingResources for which to create MBeans

createMBeans

protected void createMBeans(Server server)
Create the MBeans for the specified Server and its nested components.

Parameters: server Server for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

createMBeans

protected void createMBeans(Service service)
Create the MBeans for the specified Service and its nested components.

Parameters: service Service for which to create MBeans

Throws: Exception if an exception is thrown during MBean creation

destroyMBeans

protected void destroyMBeans(Connector connector, Service service)
Deregister the MBeans for the specified Connector and its nested components.

Parameters: connector Connector for which to deregister MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(Context context)
Deregister the MBeans for the specified Context and its nested components.

Parameters: context Context for which to deregister MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(ContextEnvironment environment)
Deregister the MBeans for the specified ContextEnvironment entry.

Parameters: environment ContextEnvironment for which to destroy MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(ContextResource resource)
Deregister the MBeans for the specified ContextResource entry.

Parameters: resource ContextResource for which to destroy MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(ContextResourceLink resourceLink)
Deregister the MBeans for the specified ContextResourceLink entry.

Parameters: resourceLink ContextResourceLink for which to destroy MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(Engine engine)
Deregister the MBeans for the specified Engine and its nested components.

Parameters: engine Engine for which to destroy MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(Host host)
Deregister the MBeans for the specified Host and its nested components.

Parameters: host Host for which to destroy MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(NamingResources resources)
Deregister the MBeans for the specified NamingResources and its nested components.

Parameters: resources NamingResources for which to destroy MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(Server server)
Deregister the MBeans for the specified Server and its related components.

Parameters: server Server for which to destroy MBeans

Throws: Exception if an exception is thrown during MBean destruction

destroyMBeans

protected void destroyMBeans(Service service)
Deregister the MBeans for the specified Service and its nested components.

Parameters: service Service for which to destroy MBeans

Throws: Exception if an exception is thrown during MBean destruction

getDescriptors

public String getDescriptors()

lifecycleEvent

public void lifecycleEvent(LifecycleEvent event)
Primary entry point for startup and shutdown events.

Parameters: event The event that has occurred

processContainerAddChild

protected void processContainerAddChild(Container parent, Container child)
Process the addition of a new child Container to a parent Container.

Parameters: parent Parent container child Child container

processContainerPropertyChange

protected void processContainerPropertyChange(Container container, String propertyName, Object oldValue, Object newValue)
Process a property change event on a Container.

Parameters: container The container on which this event occurred propertyName The name of the property that changed oldValue The previous value (may be null) newValue The new value (may be null)

Throws: Exception if an exception is thrown

processContainerRemoveChild

protected void processContainerRemoveChild(Container parent, Container child)
Process the removal of a child Container from a parent Container.

Parameters: parent Parent container child Child container

processNamingResourcesPropertyChange

protected void processNamingResourcesPropertyChange(NamingResources resources, String propertyName, Object oldValue, Object newValue)
Process a property change event on a NamingResources.

Parameters: resources The global naming resources on which this event occurred propertyName The name of the property that changed oldValue The previous value (may be null) newValue The new value (may be null)

Throws: Exception if an exception is thrown

processServerPropertyChange

protected void processServerPropertyChange(Server server, String propertyName, Object oldValue, Object newValue)
Process a property change event on a Server.

Parameters: server The server on which this event occurred propertyName The name of the property that changed oldValue The previous value (may be null) newValue The new value (may be null)

Throws: Exception if an exception is thrown

processServicePropertyChange

protected void processServicePropertyChange(Service service, String propertyName, Object oldValue, Object newValue)
Process a property change event on a Service.

Parameters: service The service on which this event occurred propertyName The name of the property that changed oldValue The previous value (may be null) newValue The new value (may be null)

Throws: Exception if an exception is thrown

propertyChange

public void propertyChange(PropertyChangeEvent event)
Handle a PropertyChangeEvent from one of the Containers we are interested in.

Parameters: event The event that has occurred

setDescriptors

public void setDescriptors(String descriptors)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.