Interface EventBuilder
-
public interface EventBuilderBuilder interface to createEventfor theEventServiceto notify HiveMQ Edge of any event regarding components such as protocol adapters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfire()This method is to be called after populating the builder with information to fire this event via the EventService.@NotNull EventBuilderwithAssociatedObject(@NotNull TypeIdentifier associatedObject)@NotNull EventBuilderwithMessage(@NotNull String message)@NotNull EventBuilderwithPayload(@NotNull Object data)@NotNull EventBuilderwithPayload(Payload.ContentType contentType, @NotNull String content)@NotNull EventBuilderwithSeverity(@NotNull Event.SEVERITY severity)@NotNull EventBuilderwithSource(@NotNull TypeIdentifier source)@NotNull EventBuilderwithTimestamp(@NotNull Long timestamp)
-
-
-
Method Detail
-
withSeverity
@NotNull @NotNull EventBuilder withSeverity(@NotNull Event.SEVERITY severity)
- Parameters:
severity- the severity of the event- Returns:
- the builder for a fluent api
-
withMessage
@NotNull @NotNull EventBuilder withMessage(@NotNull @NotNull String message)
- Parameters:
message- the message of the event- Returns:
- the builder for a fluent api
-
withPayload
@NotNull @NotNull EventBuilder withPayload(@NotNull Payload.ContentType contentType, @NotNull @NotNull String content)
- Parameters:
contentType- the content type of the payloadcontent- the content of the payload- Returns:
- the builder for a fluent api
-
withPayload
@NotNull @NotNull EventBuilder withPayload(@NotNull @NotNull Object data)
- Parameters:
data- a Jackson annotated Object from which the object mapper creates a json from.- Returns:
- the builder for a fluent api
-
withTimestamp
@NotNull @NotNull EventBuilder withTimestamp(@NotNull @NotNull Long timestamp)
- Parameters:
timestamp- the unix timestamp of this event- Returns:
- the builder for a fluent api
-
withAssociatedObject
@NotNull @NotNull EventBuilder withAssociatedObject(@NotNull @NotNull TypeIdentifier associatedObject)
- Parameters:
associatedObject- the type identifier of the associated object for this event- Returns:
- the builder for a fluent api
-
withSource
@NotNull @NotNull EventBuilder withSource(@NotNull @NotNull TypeIdentifier source)
- Parameters:
source- the type identifier of the source of this evemt- Returns:
- the builder for a fluent api
-
fire
void fire()
This method is to be called after populating the builder with information to fire this event via the EventService.
-
-