Interface ServerSentEventBuilder


  • public interface ServerSentEventBuilder
    A server sent event builder.
    Since:
    1.10
    • Method Detail

      • id

        ServerSentEventBuilder id​(@Nullable
                                  String id)
        Specify the event id for the server sent event.

        The value must not contain a '\n' character as this is not valid in an event value.

        Parameters:
        id - the event id
        Returns:
        this
      • event

        ServerSentEventBuilder event​(@Nullable
                                     String event)
        Specify the event type for the server sent event.

        The value must not contain a '\n' character as this is not valid in an event value.

        Parameters:
        event - the event type
        Returns:
        this
      • build

        ServerSentEvent build()
        Builds the event.
        Returns:
        the built event