org.eclipse.viatra.integration.mwe2.mwe2impl

## Class PublishTo

- java.lang.Object
- - org.eclipse.viatra.integration.mwe2.mwe2impl.PublishTo

- All Implemented Interfaces:
    IPublishTo

      public class PublishTo
      extends java.lang.Object
      implements IPublishTo

  SubscribeTo objects provide an interface for creating messages and sending them to a given topic in a single call, via binding a Topic and a MessageFactory together

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PublishTo()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IMessageFactory<?,? extends IMessage<?>>` | `getFactory()`
    `java.lang.String` | `getTopicName()`
    `void` | `publishMessage(java.lang.Object parameter)` Uses the factory to create a new message instance and sends it to the Topic specified by the topicName attribute.
    `void` | `setFactory(IMessageFactory<?,? extends IMessage<?>> factory)`
    `void` | `setTopicName(java.lang.String name)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PublishTo

          public PublishTo()

  - ### Method Detail

    - #### getFactory

          public IMessageFactory<?,? extends IMessage<?>> getFactory()

      Specified by:
        `getFactory` in interface `IPublishTo`

    - #### getTopicName

          public java.lang.String getTopicName()

      Specified by:
        `getTopicName` in interface `IPublishTo`

    - #### publishMessage

          public void publishMessage(java.lang.Object parameter)

      Uses the factory to create a new message instance and sends it to the Topic specified by the topicName attribute.
      Specified by:
        `publishMessage` in interface `IPublishTo`

    - #### setFactory

          public void setFactory(IMessageFactory<?,? extends IMessage<?>> factory)

      Specified by:
        `setFactory` in interface `IPublishTo`

    - #### setTopicName

          public void setTopicName(java.lang.String name)

      Specified by:
        `setTopicName` in interface `IPublishTo`