Package org.apache.catalina.startup

## Class ListenerCreateRule.OptionalListener

- java.lang.Object
- - org.apache.catalina.startup.ListenerCreateRule.OptionalListener

- All Implemented Interfaces:
    `LifecycleListener`
  Enclosing class:
    ListenerCreateRule

      public static class ListenerCreateRule.OptionalListener
      extends java.lang.Object
      implements LifecycleListener

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected java.lang.String` | `className` |
    `protected java.util.HashMap<java.lang.String,​java.lang.String>` | `properties` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OptionalListener​(java.lang.String className)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getClassName()` |
    `java.util.Set<java.lang.String>` | `getProperties()` | Return a set of the property keys.
    `java.lang.Object` | `getProperty​(java.lang.String name)` | Return a property from the protocol handler.
    `void` | `lifecycleEvent​(LifecycleEvent event)` | Acknowledge the occurrence of the specified event.
    `boolean` | `setProperty​(java.lang.String name, java.lang.String value)` | Set the given property.

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

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

- - ### Field Detail

    - #### className

          protected final java.lang.String className

    - #### properties

          protected final java.util.HashMap<java.lang.String,​java.lang.String> properties

  - ### Constructor Detail

    - #### OptionalListener

          public OptionalListener​(java.lang.String className)

  - ### Method Detail

    - #### getClassName

          public java.lang.String getClassName()

      Returns:
        the className

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

    - #### getProperties

          public java.util.Set<java.lang.String> getProperties()

      Return a set of the property keys.
      Returns:
        the set

    - #### getProperty

          public java.lang.Object getProperty​(java.lang.String name)

      Return a property from the protocol handler.
      Parameters:
        `name` - the property name
      Returns:
        the property value

    - #### setProperty

          public boolean setProperty​(java.lang.String name,
                                     java.lang.String value)

      Set the given property.
      Parameters:
        `name` - the property name
        `value` - the property value
      Returns:
        `true`