Package eu.bandm.tools.message
Class MessageKindFilter<M extends Message>
java.lang.Object
eu.bandm.tools.message.SingleSender<M>
eu.bandm.tools.message.MessageKindFilter<M>
- All Implemented Interfaces:
MessageReceiver<M>
public class MessageKindFilter<M extends Message>
extends SingleSender<M>
implements MessageReceiver<M>
A filter which propagates only those messages the
Message.Kind
of which is currently in the selection.-
Field Summary
Fields inherited from class eu.bandm.tools.message.SingleSender
receiver
-
Constructor Summary
ConstructorDescriptionMessageKindFilter
(MessageReceiver<? super M> d) No kind is initially selectedMessageKindFilter
(MessageReceiver<? super M> d, Message.Kind... kk) The given kinds are initially selected -
Method Summary
Modifier and TypeMethodDescriptionAdds allMessage.Kind
s which are marked as critical.EvidentAdds the kind to selection.addKind
(Message.Kind... kk) Adds the kinds kinds to selection.void
Propagate to theSingleSender.receiver
if message's kind is in selection.EvidentRemove the kind from selectionremoveKind
(Message.Kind... kk) Remove the kinds from selectionMethods inherited from class eu.bandm.tools.message.SingleSender
getReceiver, send, setReceiver
-
Field Details
-
kinds
The selected kinds
-
-
Constructor Details
-
MessageKindFilter
No kind is initially selected -
MessageKindFilter
The given kinds are initially selected
-
-
Method Details
-
addAllCriticalKinds
Adds allMessage.Kind
s which are marked as critical. -
addKind
Adds the kind to selection. -
addKind
Adds the kinds kinds to selection. -
addAllKinds
Evident -
removeKind
Remove the kind from selection -
removeKind
Remove the kinds from selection -
removeAllKinds
Evident -
receive
Propagate to theSingleSender.receiver
if message's kind is in selection.- Specified by:
receive
in interfaceMessageReceiver<M extends Message>
-