MapperListener (Apache Tomcat 10.1.20 API Documentation)
Description: declaration: package: org.apache.catalina.mapper, class: MapperListener

Package org.apache.catalina.mapper

# Class MapperListener

java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.mapper.MapperListener

All Implemented Interfaces:
  `MBeanRegistration`, `ContainerListener`, `JmxEnabled`, `Lifecycle`, `LifecycleListener`

public class MapperListener extends LifecycleMBeanBase implements ContainerListener, LifecycleListener
Mapper listener.

Author:
  Remy Maucherat, Costin Manolache

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.catalina.Lifecycle

  `Lifecycle.SingleUse`

- ## Field Summary

  ### Fields inherited from interface org.apache.catalina.Lifecycle

  `AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MapperListener(Service service)`
  Create mapper listener.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `containerEvent(ContainerEvent event)`
  Acknowledge the occurrence of the specified event.
  `protected String`
  `getDomainInternal()`
  Method implemented by sub-classes to identify the domain in which MBeans should be registered.
  `protected String`
  `getObjectNameKeyProperties()`
  Allow sub-classes to specify the key properties component of the `ObjectName` that will be used to register this component.
  `void`
  `lifecycleEvent(LifecycleEvent event)`
  Acknowledge the occurrence of the specified event.
  `void`
  `startInternal()`
  Sub-classes must ensure that the state is changed to `LifecycleState.STARTING` during the execution of this method.
  `void`
  `stopInternal()`
  Sub-classes must ensure that the state is changed to `LifecycleState.STOPPING` during the execution of this method.

  ### Methods inherited from class org.apache.catalina.util.LifecycleMBeanBase

  `destroyInternal, getDomain, getObjectName, initInternal, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregister`

  ### Methods inherited from class org.apache.catalina.util.LifecycleBase

  `addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop`

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

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

- ## Constructor Details

  - ### MapperListener

    public MapperListener(Service service)
    Create mapper listener.
    Parameters:
      `service` - The service this listener is associated with

- ## Method Details

  - ### startInternal

    public void startInternal() throws LifecycleException
    Description copied from class: `LifecycleBase`
    Sub-classes must ensure that the state is changed to `LifecycleState.STARTING` during the execution of this method. Changing state will trigger the `Lifecycle.START_EVENT` event. If a component fails to start it may either throw a `LifecycleException` which will cause it's parent to fail to start or it can place itself in the error state in which case `LifecycleBase.stop()` will be called on the failed component but the parent component will continue to start normally.
    Specified by:
      `startInternal` in class `LifecycleBase`
    Throws:
      `LifecycleException` - Start error occurred

  - ### stopInternal

    public void stopInternal() throws LifecycleException
    Description copied from class: `LifecycleBase`
    Sub-classes must ensure that the state is changed to `LifecycleState.STOPPING` during the execution of this method. Changing state will trigger the `Lifecycle.STOP_EVENT` event.
    Specified by:
      `stopInternal` in class `LifecycleBase`
    Throws:
      `LifecycleException` - Stop error occurred

  - ### getDomainInternal

    protected String getDomainInternal()
    Description copied from class: `LifecycleMBeanBase`
    Method implemented by sub-classes to identify the domain in which MBeans should be registered.
    Specified by:
      `getDomainInternal` in class `LifecycleMBeanBase`
    Returns:
      The name of the domain to use to register MBeans.

  - ### getObjectNameKeyProperties

    protected String getObjectNameKeyProperties()
    Description copied from class: `LifecycleMBeanBase`
    Allow sub-classes to specify the key properties component of the `ObjectName` that will be used to register this component.
    Specified by:
      `getObjectNameKeyProperties` in class `LifecycleMBeanBase`
    Returns:
      The string representation of the key properties component of the desired `ObjectName`

  - ### containerEvent

    public void containerEvent(ContainerEvent event)
    Description copied from interface: `ContainerListener`
    Acknowledge the occurrence of the specified event.
    Specified by:
      `containerEvent` in interface `ContainerListener`
    Parameters:
      `event` - ContainerEvent that has occurred

  - ### lifecycleEvent

    public void lifecycleEvent(LifecycleEvent event)
    Description copied from interface: `LifecycleListener`
    Acknowledge the occurrence of the specified event.
    Specified by:
      `lifecycleEvent` in interface `LifecycleListener`
    Parameters:
      `event` - LifecycleEvent that has occurred