Enum Class WicaStreamServerSentEventBuilder
java.lang.Object
java.lang.Enum<WicaStreamServerSentEventBuilder>
ch.psi.wica.infrastructure.stream.WicaStreamServerSentEventBuilder
- All Implemented Interfaces:
Serializable
,Comparable<WicaStreamServerSentEventBuilder>
,Constable
@Immutable
public enum WicaStreamServerSentEventBuilder
extends Enum<WicaStreamServerSentEventBuilder>
Provides the functionality to build Server-Sent-Events (SSE) for the WICA
streaming service.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefines the event type and comment associated with CHANNEL METADATA Server-Sent-Events.Defines the event type and comment associated with CHANNEL MONITORED VALUE Server-Sent-Events.Defines the event type and comment associated with CHANNEL POLLED VALUE Server-Sent-Events.Defines the event type and comment associated with HEARTBEAT Server-Sent-Events. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.codec.ServerSentEvent
<String> build
(WicaStreamId id, String dataString) Returns a Wica ServerSent Event customised with the supplied WicaStream id and String data payload.Returns the enum constant of this class with the specified name.static WicaStreamServerSentEventBuilder[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EV_WICA_SERVER_HEARTBEAT
Defines the event type and comment associated with HEARTBEAT Server-Sent-Events. -
EV_WICA_CHANNEL_METADATA
Defines the event type and comment associated with CHANNEL METADATA Server-Sent-Events. -
EV_WICA_CHANNEL_POLLED_VALUES
Defines the event type and comment associated with CHANNEL POLLED VALUE Server-Sent-Events. -
EV_WICA_CHANNEL_MONITORED_VALUES
Defines the event type and comment associated with CHANNEL MONITORED VALUE Server-Sent-Events.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
build
public org.springframework.http.codec.ServerSentEvent<String> build(WicaStreamId id, String dataString) Returns a Wica ServerSent Event customised with the supplied WicaStream id and String data payload.- Parameters:
id
- the WicaStreamIddataString
- the String data- Returns:
- the generated SSE.
-