Modifier and Type | Method and Description |
---|---|
Event |
build()
Build factory method for the event.
|
Event.Builder |
withAggregationKey(String aggregationKey)
Aggregation key for the event.
|
Event.Builder |
withAlertType(Event.AlertType alertType)
Alert type for the event.
|
Event.Builder |
withDate(Date date)
Date for the event.
|
Event.Builder |
withDate(long millisSinceEpoch)
Date for the event.
|
Event.Builder |
withHostname(String hostname)
Source hostname for the event.
|
Event.Builder |
withPriority(Event.Priority priority)
Priority for the event.
|
Event.Builder |
withSourceTypeName(String sourceTypeName)
Source Type name for the event.
|
Event.Builder |
withText(String text)
Text for the event.
|
Event.Builder |
withTitle(String title)
Title for the event.
|
public Event build()
public Event.Builder withTitle(String title)
title
- Event title ; mandatorypublic Event.Builder withText(String text)
text
- Event text ; supports line breaks ; mandatorypublic Event.Builder withDate(Date date)
date
- Assign a timestamp to the event ; Default: none (Default is the current Unix epoch timestamp when not sent)public Event.Builder withDate(long millisSinceEpoch)
millisSinceEpoch
- Assign a timestamp to the event ; Default: none (Default is the current Unix epoch timestamp when not sent)public Event.Builder withHostname(String hostname)
hostname
- Assign a hostname to the event ; Default: nonepublic Event.Builder withAggregationKey(String aggregationKey)
aggregationKey
- Assign an aggregation key to the event, to group it with some others ; Default: nonepublic Event.Builder withPriority(Event.Priority priority)
priority
- Can be "normal" or "low" ; Default: "normal"public Event.Builder withSourceTypeName(String sourceTypeName)
sourceTypeName
- Assign a source type to the event ; Default: nonepublic Event.Builder withAlertType(Event.AlertType alertType)
alertType
- Can be "error", "warning", "info" or "success" ; Default: "info"Copyright © 2022. All rights reserved.