Package: groovy.jmx.builder

## [Groovy] Class JmxEmitterFactory

- groovy.jmx.builder.JmxEmitterFactory

-     class JmxEmitterFactory
      extends AbstractFactory

  This class is the factory for the emitter node. This node facilitates the declaration of a JMX event emitter. The emitter is used to broadcast arbitrary event on the MBeanServer's event bus. Registered listeners are able to consume event once sent.

  Supported syntax:

       def jmx = JmxBuilder()
       jmx.emitter(name:"Object name"|ObjectName(), event:"event type")
       ...
       jmx.emitter.send(object)

- - ### Constructor Summary

    Constructors
    Constructor and description
    `JmxEmitterFactory()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `boolean` | `isLeaf()` Indicates that the emitter node is terminal.
    `` | `Object` | `newInstance(FactoryBuilderSupport builder, Object nodeName, Object nodeParam, Map nodeAttribs)` Creates and registers an event emitter.
    `` | `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 emitter 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

    - #### JmxEmitterFactory()

  - ### Method Detail

    - #### boolean isLeaf()

      Indicates that the emitter node is terminal.

      Returns:
        `true`

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

      Creates and registers an event emitter.

      Parameters:
        `builder` - the active builder
        `nodeName` - the node name
        `nodeParam` - positional node arguments
        `nodeAttribs` - named node attributes
      Returns:
        the exported emitter facade

    - #### 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 emitter to its parent collection when one exists.

      Parameters:
        `builder` - the active builder
        `parentNode` - the parent node
        `thisNode` - the created emitter