T - the generic typepublic class MessageSubject<T> extends Object implements MessageSource<T>
MessageSubject.| Constructor and Description |
|---|
MessageSubject()
Instantiates a new message subject.
|
MessageSubject(T source)
Instantiates a new message subject.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(MessageListener<T> messageListener)
Adds the given messageListeners to the existing messageListeners list.
|
void |
addAll(Collection<MessageListener<T>> messageListeners)
Adds the all given messageListener to the existing messageListeners list.
|
void |
fireMessage(T source)
Fire the given message.
|
void |
remove(MessageListener<T> messageListener)
Removes the given MessageListener object from the existing messageListeners list.
|
void |
removeAll(Collection<MessageListener<T>> messageListeners)
Removes the all given MessageListener objects from the messageListeners list.
|
public MessageSubject()
public MessageSubject(T source)
source - the sourcepublic void add(MessageListener<T> messageListener)
add in interface MessageSource<T>messageListener - the MessageListener objectpublic void addAll(Collection<MessageListener<T>> messageListeners)
addAll in interface MessageSource<T>messageListeners - the MessageListener objectspublic void fireMessage(T source)
fireMessage in interface MessageSource<T>source - the message sourcepublic void remove(MessageListener<T> messageListener)
remove in interface MessageSource<T>messageListener - the MessageListener objectpublic void removeAll(Collection<MessageListener<T>> messageListeners)
removeAll in interface MessageSource<T>messageListeners - the MessageListener objectsCopyright © 2015–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.