Package: groovy.jmx.builder

## [Groovy] Class JmxListenerFactory

- groovy.jmx.builder.JmxListenerFactory

-     class JmxListenerFactory
      extends AbstractFactory

  This factory class is used to create a listener() node for JmxBuilder. Listener nodes are used to create a generic event listener (that is automatically registered with the MBean) that can handle any event broadcasted on the MBeanServer's event bus.

  Syntax supported:

       JmxBuilder.listener(event:"event type", from:"Object Name"|ObjectName(), call:{event->
         // event handling code here.
      })

  See Also:
    JmxEventListener

- - ### Constructor Summary

    Constructors
    Constructor and description
    `JmxListenerFactory()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `boolean` | `isLeaf()` Indicates that the listener node is terminal.
    `` | `Object` | `newInstance(FactoryBuilderSupport builder, Object nodeName, Object nodeParam, Map nodeAttribs)` Creates and registers a listener description.
    `` | `boolean` | `onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map nodeAttribs)` Leaves attribute handling to newInstance(FactoryBuilderSupport, Object, Object, Map).
    `` | `void` | `onNodeCompleted(FactoryBuilderSupport builder, Object parentNode, Object thisNode)` Adds the created listener metadata to its parent collection when one exists.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractFactory` | `isHandlesNodeChildren, isLeaf, onFactoryRegistration, onHandleNodeAttributes, onNodeChildren, onNodeCompleted, setChild, setParent`

- - ### Constructor Detail

    - #### JmxListenerFactory()

  - ### Method Detail

    - #### boolean isLeaf()

      Indicates that the listener node is terminal.

      Returns:
        `true`

    - #### Object newInstance(FactoryBuilderSupport builder, Object nodeName, Object nodeParam, Map nodeAttribs)

      Creates and registers a listener description.

      Parameters:
        `builder` - the active builder
        `nodeName` - the node name
        `nodeParam` - positional node arguments
        `nodeAttribs` - named node attributes
      Returns:
        the normalized listener metadata

    - #### boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map nodeAttribs)

      Leaves attribute handling to newInstance(FactoryBuilderSupport, Object, Object, Map).

      Parameters:
        `builder` - the active builder
        `node` - the current node
        `nodeAttribs` - remaining node attributes
      Returns:
        `false`

    - #### void onNodeCompleted(FactoryBuilderSupport builder, Object parentNode, Object thisNode)

      Adds the created listener metadata to its parent collection when one exists.

      Parameters:
        `builder` - the active builder
        `parentNode` - the parent node
        `thisNode` - the listener metadata