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.
  • Enum Constant Details

    • EV_WICA_SERVER_HEARTBEAT

      public static final WicaStreamServerSentEventBuilder EV_WICA_SERVER_HEARTBEAT
      Defines the event type and comment associated with HEARTBEAT Server-Sent-Events.
    • EV_WICA_CHANNEL_METADATA

      public static final WicaStreamServerSentEventBuilder EV_WICA_CHANNEL_METADATA
      Defines the event type and comment associated with CHANNEL METADATA Server-Sent-Events.
    • EV_WICA_CHANNEL_POLLED_VALUES

      public static final WicaStreamServerSentEventBuilder EV_WICA_CHANNEL_POLLED_VALUES
      Defines the event type and comment associated with CHANNEL POLLED VALUE Server-Sent-Events.
    • EV_WICA_CHANNEL_MONITORED_VALUES

      public static final WicaStreamServerSentEventBuilder EV_WICA_CHANNEL_MONITORED_VALUES
      Defines the event type and comment associated with CHANNEL MONITORED VALUE Server-Sent-Events.
  • Method Details

    • values

      public static WicaStreamServerSentEventBuilder[] 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

      public static WicaStreamServerSentEventBuilder valueOf(String name)
      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 name
      NullPointerException - 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 WicaStreamId
      dataString - the String data
      Returns:
      the generated SSE.