| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
SseEvent.Builder |
addAllClientIds(Iterable<String> elements)
Adds elements to
clientIds set. |
SseEvent.Builder |
addAllExcludeClientIds(Iterable<String> elements)
Adds elements to
excludeClientIds set. |
SseEvent.Builder |
addClientId(String... elements)
Adds elements to
clientIds set. |
SseEvent.Builder |
addClientId(String element)
Adds one element to
clientIds set. |
SseEvent.Builder |
addExcludeClientId(String... elements)
Adds elements to
excludeClientIds set. |
SseEvent.Builder |
addExcludeClientId(String element)
Adds one element to
excludeClientIds set. |
ch.rasc.sse.eventbus.ImmutableSseEvent |
build()
Builds a new
ImmutableSseEvent. |
SseEvent.Builder |
clientIds(Iterable<String> elements)
Sets or replaces all elements for
clientIds set. |
SseEvent.Builder |
comment(Optional<String> comment)
Initializes the optional value
comment to comment. |
SseEvent.Builder |
comment(String comment)
Initializes the optional value
comment to comment. |
SseEvent.Builder |
data(Object data)
Initializes the value for the
data attribute. |
SseEvent.Builder |
event(String event)
Initializes the value for the
event attribute. |
SseEvent.Builder |
excludeClientIds(Iterable<String> elements)
Sets or replaces all elements for
excludeClientIds set. |
SseEvent.Builder |
from(SseEvent instance)
Fill a builder with attribute values from the provided
SseEvent instance. |
SseEvent.Builder |
id(Optional<String> id)
Initializes the optional value
id to id. |
SseEvent.Builder |
id(String id)
Initializes the optional value
id to id. |
SseEvent.Builder |
retry(Duration retry)
Initializes the optional value
retry to retry. |
SseEvent.Builder |
retry(Optional<? extends Duration> retry)
Initializes the optional value
retry to retry. |
public final SseEvent.Builder from(SseEvent instance)
SseEvent instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SseEvent.Builder addClientId(String element)
clientIds set.element - A clientIds elementthis builder for use in a chained invocationpublic final SseEvent.Builder addClientId(String... elements)
clientIds set.elements - An array of clientIds elementsthis builder for use in a chained invocationpublic final SseEvent.Builder clientIds(Iterable<String> elements)
clientIds set.elements - An iterable of clientIds elementsthis builder for use in a chained invocationpublic final SseEvent.Builder addAllClientIds(Iterable<String> elements)
clientIds set.elements - An iterable of clientIds elementsthis builder for use in a chained invocationpublic final SseEvent.Builder addExcludeClientId(String element)
excludeClientIds set.element - A excludeClientIds elementthis builder for use in a chained invocationpublic final SseEvent.Builder addExcludeClientId(String... elements)
excludeClientIds set.elements - An array of excludeClientIds elementsthis builder for use in a chained invocationpublic final SseEvent.Builder excludeClientIds(Iterable<String> elements)
excludeClientIds set.elements - An iterable of excludeClientIds elementsthis builder for use in a chained invocationpublic final SseEvent.Builder addAllExcludeClientIds(Iterable<String> elements)
excludeClientIds set.elements - An iterable of excludeClientIds elementsthis builder for use in a chained invocationpublic final SseEvent.Builder event(String event)
event attribute.
If not set, this attribute will have a default value as returned by the initializer of event.
event - The value for eventthis builder for use in a chained invocationpublic final SseEvent.Builder data(Object data)
data attribute.data - The value for datathis builder for use in a chained invocationpublic final SseEvent.Builder retry(Duration retry)
retry to retry.retry - The value for retrythis builder for chained invocationpublic final SseEvent.Builder retry(Optional<? extends Duration> retry)
retry to retry.retry - The value for retrythis builder for use in a chained invocationpublic final SseEvent.Builder id(String id)
id to id.id - The value for idthis builder for chained invocationpublic final SseEvent.Builder id(Optional<String> id)
id to id.id - The value for idthis builder for use in a chained invocationpublic final SseEvent.Builder comment(String comment)
comment to comment.comment - The value for commentthis builder for chained invocationpublic final SseEvent.Builder comment(Optional<String> comment)
comment to comment.comment - The value for commentthis builder for use in a chained invocationpublic ch.rasc.sse.eventbus.ImmutableSseEvent build()
ImmutableSseEvent.IllegalStateException - if any required attributes are missingCopyright © 2016–2017. All rights reserved.