Creates a listener element.
A listener listens to an event generator (an iterator or an I/O attribute).
An iterator fires a next event when it gets a next value, or a done event
when hasNext() returns false. An attribute fires a next event
when it gets a new value.
The listener performs an action when it receives an event. Actions are specific to listeners. See listeners for details, or the javadoc for different listeners. Current listeners are: Values , DMAttribute , and DMElement .
Element Information
| Element class | ListenerConfig |
| Implementation class | DatamixerListener |
| Nested elements | none |
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
| action | String | yes | The action that the listener should carry out, on receiving notification of an event. |
| event | String | yes | The event that the listener will listen for. |
| generator | String | yes | The id of the event generator. |
| listener | String | yes | The id of the listener that listens for events. |
Examples
<!--
The listener is an I/O element. With each next event by the iterator,
the element sets the iterator's value into itself, and writes it.
-->
<dm:listener listener="csvBuildings" event="next" action="setValueWrite"/>