Product Site

5.1.2.19. triggered

This method implements the AlarmNotification interface. It will be called whenever an Alarm or a Ticker triggers, for which a Message object was set as notification target.

As a result of receiving such a notification, triggered will send the receiving message to start processing. Any source argument will be ignored.

See also class AlarmNotification.

Example 5.24. Message class — triggered method
arg = .Array~new(1)
msg = .Message~new(.a~new, "ring", "A", arg)
oneSecond = .Alarm~new(1, msg, arg)
arg~append(oneSecond)
-- oneSecond = .Alarm~new(1, .Message~new(.a~new, "ring", "I", alarm))
say "processing continues"

::class a
::method ring
use strict arg alarm
say "alarm went off at" .DateTime~new
say "was scheduled for" alarm~scheduledTime

may output
processing continues
alarm went off at 2015-12-18T16:54:15.550000
was scheduled for 2015-12-18T16:54:15.545000