org.eclipse.viatra.integration.mwe2

## Interface ITopic

- All Known Implementing Classes:
    Topic

      public interface ITopic

  Interface that defines the base functions of a Topic object, which is used to implement message based communication between individual ITransformationStep objects. Transformation steps can add messages to or subscribe to these topics. The creation and procession of these events is done by IMessageFactory and IMessageProcessor objects.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMessage(IMessage<? extends java.lang.Object> message)` Adds the provided message to this topic
    `void` | `addSubscriber(ITransformationStep subscriber)` Adds a new subscriber to this topic
    `java.util.List<IMessage<? extends java.lang.Object>>` | `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 messages assigned to the given transformation step
    `void` | `setName(java.lang.String name)`

- - ### Method Detail

    - #### getName

          java.lang.String getName()

    - #### setName

          void setName(java.lang.String name)

    - #### addMessage

          void addMessage(IMessage<? extends java.lang.Object> message)

      Adds the provided message to this topic
      Parameters:
        `message` - Message added to this topic

    - #### removeMessage

          void removeMessage(IMessage<?> message,
                             ITransformationStep sub)

      Removes messages assigned to the given transformation step
      Parameters:
        `message` - Message to be removed
        `sub` - Specified subscriber

    - #### removeMessage

          void removeMessage(IMessage<?> message)

      Removes the given message from every subscriber

    - #### getMessages

          java.util.List<IMessage<? extends java.lang.Object>> getMessages(ITransformationStep sub)

      Returns every message sent to the given subscriber

    - #### addSubscriber

          void addSubscriber(ITransformationStep subscriber)

      Adds a new subscriber to this topic

    - #### getSubscribers

          java.util.List<ITransformationStep> getSubscribers()

      Returns the subscribers of this topic