Multicasts pattern
A multicast is a consume calling on multiple notify subroutines. When a consume,
supported by a svc_subr
service, is invoked, it fires all subroutine notifies on
that service.
In the example in Table 1, once the consume is satisfied, all subroutine notifies on the same service are fired.
Example | Description |
---|---|
<mix name="Mix"> <service name="ForeCaster" provision="subr"/> <consume name="WillRain" fields="RAIN" service="Subr"> <prop name="subr.spec" function="FunRain"/> </consume> <notify name="GetUmbrella" clients="Subr" fields="UMBRELLA" service="Sequencer"> <prop name="subr.spec" function="FunRain"/> </notify> <notify name="CloseWindow" clients="Subr" fields="CLOSE" service="Sequencer"> <prop name="subr.spec" function="FunRain"/> </notify> <notify name="CancelTennis" clients="Subr" fields="CANCEL" service="Sequencer"> <prop name="subr.spec" function="FunRain"/> </notify> </mix> |
The consume WillRain is supported by the svc_subr service
ForeCaster .The three notify operations all specify this same service as client. The
subr.spec properties in all operations
specify the same function: FunRain .
Whenever the WillRain consume is
satisfied, the ForeCaster service fires all three
notifies.It does not matter whether the notifies are inside the same mix or each inside a different mix or folder. |