Broadcasts a message to multiple sinks. All messages sent to the
Multicaster will be sent to all the sinks it is linked to. In diagram
form:
+-------------+
|Multicaster |
addSink() | +---------+|
------> |/-|Sink ||
|| +---------+|
|| +---------+|
put() / offer() --->-|Sink ||
|| +---------+|
|| +---------+|
|\-|Sink ||
| +---------+|
+-------------+
Note that the Multicaster is very similar to the
Alternator Alternator : where the multicaster sends a received message to
all connected sinks, the Alternator sends it to only one sink.
Also note that the Multicaster is also similar to the
Screener screener : where the multicaster sends a received message to all
connected sinks, the screener does so based on a user-provided
configuration.
author: Leo Simons version: $Id: Multicaster.java,v 1.1 2004/03/22 21:20:13 lsimons Exp $ |