Class SingleSender<M extends Message>

java.lang.Object
eu.bandm.tools.message.SingleSender<M>
Type Parameters:
M - the message type propagated by this sender
Direct Known Subclasses:
MessageCatcher, MessageMapper, MessagePasser, SimpleMessage.LocationMapper, SimpleMessage.Sender

public abstract class SingleSender<M extends Message> extends Object
Common superclass of classes which send messages to one single switchable drain. This includes some genuine message sources, ie. senders only, but most of the subclasses are MessageReceivers, which pass on the received messages to that single drain.

That drain can be inquired and set, ie. it can change dynamically during execution. Intentionally, the code will crash if it is equal to null and send(M) is called.