Interface ServerSentEvent.Builder<T>

    • Method Detail

      • comment

        ServerSentEvent.Builder<Tcomment​(String comment)
        Set SSE comment. If a multi-line comment is provided, it will be turned into multiple SSE comment lines as defined in Server-Sent Events W3C recommendation.
        Parameters:
        comment - the comment to set
        Returns:
        this builder
      • data

        ServerSentEvent.Builder<Tdata​(@Nullable
                                        T data)
        Set the value of the data field. If the data argument is a multi-line String, it will be turned into multiple data field lines as defined in the Server-Sent Events W3C recommendation. If data is not a String, it will be encoded into JSON.
        Parameters:
        data - the value of the data field
        Returns:
        this builder