Package net.solarnetwork.event
Class BasicAppEvent.Builder
java.lang.Object
net.solarnetwork.event.BasicAppEvent.Builder
- Enclosing class:
- BasicAppEvent
Builder to build
BasicAppEvent.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the event instance.Get the configured creation date.Get the configured event properties.getTopic()Get the configured topic.withCreated(Instant created) Configure the creation date.withEventProperties(Map<String, ?> eventProperties) Configure event properties.Configure the topic.
-
Constructor Details
-
Builder
protected Builder()Constructor. -
Builder
Constructor.- Parameters:
basicAppEvent- the event to start with
-
-
Method Details
-
getTopic
Get the configured topic.- Returns:
- the topic the topic
-
withTopic
Configure the topic.- Parameters:
topic- the topic- Returns:
- this builder
-
getCreated
Get the configured creation date.- Returns:
- the creation date
-
withCreated
Configure the creation date.- Parameters:
created- the creation date- Returns:
- the
-
getEventProperties
Get the configured event properties.- Returns:
- the event properties
-
withEventProperties
Configure event properties.- Parameters:
eventProperties- the properties, or null- Returns:
- this builder
-
build
Build the event instance.- Returns:
- the event
-