dm:listener

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 elementsnone

Attributes

Name Type Required Description
actionStringyes The action that the listener should carry out, on receiving notification of an event.
eventStringyes The event that the listener will listen for.
generatorStringyes The id of the event generator.
listenerStringyes 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"/>