public class Topic extends java.lang.Object implements ITopic
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
name |
protected java.util.Map<ITransformationStep,java.util.List<IMessage<?>>> |
subscriberMap |
| Constructor and Description |
|---|
Topic(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(IMessage<?> message)
Adds the provided message to this topic
|
void |
addSubscriber(ITransformationStep subscriber)
Adds a new subscriber to this topic
|
java.util.List<IMessage<?>> |
getMessages(ITransformationStep sub)
Returns every message sent to the given subscriber
|
java.lang.String |
getName() |
java.util.List<ITransformationStep> |
getSubscribers()
Returns the subscribers of this topic
|
void |
removeMessage(IMessage<?> message)
Removes the given message from every subscriber
|
void |
removeMessage(IMessage<?> message,
ITransformationStep sub)
Removes the message from the specified step.
|
void |
setName(java.lang.String name) |
protected java.lang.String name
protected java.util.Map<ITransformationStep,java.util.List<IMessage<?>>> subscriberMap
public void addMessage(IMessage<?> message)
ITopicaddMessage in interface ITopicmessage - Message added to this topicpublic void addSubscriber(ITransformationStep subscriber)
ITopicaddSubscriber in interface ITopicpublic java.util.List<IMessage<?>> getMessages(ITransformationStep sub)
ITopicgetMessages in interface ITopicpublic java.util.List<ITransformationStep> getSubscribers()
ITopicgetSubscribers in interface ITopicpublic void removeMessage(IMessage<?> message)
ITopicremoveMessage in interface ITopicpublic void removeMessage(IMessage<?> message, ITransformationStep sub)
removeMessage in interface ITopicmessage - Message to be removedsub - Specified subscriber