T
- The event typepublic interface Event<T>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA
The data parameter.
|
static java.lang.String |
EVENT
The event parameter.
|
static java.lang.String |
ID
The id parameter.
|
static java.lang.String |
RETRY
The retry parameter.
|
Modifier and Type | Method and Description |
---|---|
Event<T> |
comment(java.lang.String comment)
Sets the event comment.
|
java.lang.String |
getComment() |
T |
getData() |
java.lang.String |
getId() |
java.lang.String |
getName() |
java.time.Duration |
getRetry() |
Event<T> |
id(java.lang.String id)
Sets the id.
|
Event<T> |
name(java.lang.String name)
Sets the event name.
|
static <ET> Event<ET> |
of(ET data)
Constructs a new event for the given data.
|
static <ET> Event<ET> |
of(Event event,
ET data)
Constructs a new event for the given data.
|
Event<T> |
retry(java.time.Duration duration)
Sets the retry duration.
|
static final java.lang.String ID
static final java.lang.String EVENT
static final java.lang.String DATA
static final java.lang.String RETRY
T getData()
java.lang.String getId()
java.lang.String getName()
java.lang.String getComment()
java.time.Duration getRetry()
Event<T> retry(@Nullable java.time.Duration duration)
duration
- The durationEvent<T> id(@Nullable java.lang.String id)
id
- The id to setEvent<T> name(@Nullable java.lang.String name)
name
- The event nameEvent<T> comment(@Nullable java.lang.String comment)
comment
- The Event commentstatic <ET> Event<ET> of(ET data)
ET
- The data typedata
- The data