Class BasicAppEvent.Builder

java.lang.Object
net.solarnetwork.event.BasicAppEvent.Builder
Enclosing class:
BasicAppEvent

public static class BasicAppEvent.Builder extends Object
Builder to build BasicAppEvent.
  • Constructor Details

    • Builder

      protected Builder()
      Constructor.
    • Builder

      protected Builder(AppEvent basicAppEvent)
      Constructor.
      Parameters:
      basicAppEvent - the event to start with
  • Method Details

    • getTopic

      public String getTopic()
      Get the configured topic.
      Returns:
      the topic the topic
    • withTopic

      public BasicAppEvent.Builder withTopic(String topic)
      Configure the topic.
      Parameters:
      topic - the topic
      Returns:
      this builder
    • getCreated

      public Instant getCreated()
      Get the configured creation date.
      Returns:
      the creation date
    • withCreated

      public BasicAppEvent.Builder withCreated(Instant created)
      Configure the creation date.
      Parameters:
      created - the creation date
      Returns:
      the
    • getEventProperties

      public Map<String,?> getEventProperties()
      Get the configured event properties.
      Returns:
      the event properties
    • withEventProperties

      public BasicAppEvent.Builder withEventProperties(Map<String,?> eventProperties)
      Configure event properties.
      Parameters:
      eventProperties - the properties, or null
      Returns:
      this builder
    • build

      public BasicAppEvent build()
      Build the event instance.
      Returns:
      the event