org.springframework.web.servlet.mvc.method.annotation

## Interface SseEmitter.SseEventBuilder

- Enclosing class:
    SseEmitter

      public static interface SseEmitter.SseEventBuilder

  A builder for an SSE event.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<ResponseBodyEmitter.DataWithMediaType>` | `build()` Return one or more Object-MediaType pairs to write via `SseEmitter.send(Object, MediaType)`.
    `SseEmitter.SseEventBuilder` | `comment(String comment)` Add an SSE "comment" line.
    `SseEmitter.SseEventBuilder` | `data(Object object)` Add an SSE "data" line.
    `SseEmitter.SseEventBuilder` | `data(Object object, MediaType mediaType)` Add an SSE "data" line.
    `SseEmitter.SseEventBuilder` | `id(String id)` Add an SSE "id" line.
    `SseEmitter.SseEventBuilder` | `name(String eventName)` Add an SSE "event" line.
    `SseEmitter.SseEventBuilder` | `reconnectTime(long reconnectTimeMillis)` Add an SSE "retry" line.

- - ### Method Detail

    - #### id

          SseEmitter.SseEventBuilder id(String id)

      Add an SSE "id" line.

    - #### name

          SseEmitter.SseEventBuilder name(String eventName)

      Add an SSE "event" line.

    - #### reconnectTime

          SseEmitter.SseEventBuilder reconnectTime(long reconnectTimeMillis)

      Add an SSE "retry" line.

    - #### comment

          SseEmitter.SseEventBuilder comment(String comment)

      Add an SSE "comment" line.

    - #### data

          SseEmitter.SseEventBuilder data(Object object)

      Add an SSE "data" line.

    - #### data

          SseEmitter.SseEventBuilder data(Object object,
                                          @Nullable
                                          MediaType mediaType)

      Add an SSE "data" line.

    - #### build

          Set<ResponseBodyEmitter.DataWithMediaType> build()

      Return one or more Object-MediaType pairs to write via `SseEmitter.send(Object, MediaType)`.
      Since:
        4.2.3