private static class SseEmitter.SseEventBuilderImpl extends java.lang.Object implements SseEmitter.SseEventBuilder
Modifier and Type | Field and Description |
---|---|
private java.util.Set<ResponseBodyEmitter.DataWithMediaType> |
dataToSend |
private java.lang.StringBuilder |
sb |
Modifier | Constructor and Description |
---|---|
private |
SseEventBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
(package private) SseEmitter.SseEventBuilderImpl |
append(java.lang.String text) |
java.util.Set<ResponseBodyEmitter.DataWithMediaType> |
build()
Return one or more Object-MediaType pairs to write via
SseEmitter.send(Object, MediaType) . |
SseEmitter.SseEventBuilder |
comment(java.lang.String comment)
Add an SSE "comment" line.
|
SseEmitter.SseEventBuilder |
data(java.lang.Object object)
Add an SSE "data" line.
|
SseEmitter.SseEventBuilder |
data(java.lang.Object object,
MediaType mediaType)
Add an SSE "data" line.
|
SseEmitter.SseEventBuilder |
id(java.lang.String id)
Add an SSE "id" line.
|
SseEmitter.SseEventBuilder |
name(java.lang.String name)
Add an SSE "event" line.
|
SseEmitter.SseEventBuilder |
reconnectTime(long reconnectTimeMillis)
Add an SSE "event" line.
|
private void |
saveAppendedText() |
private final java.util.Set<ResponseBodyEmitter.DataWithMediaType> dataToSend
private java.lang.StringBuilder sb
public SseEmitter.SseEventBuilder comment(java.lang.String comment)
SseEmitter.SseEventBuilder
comment
in interface SseEmitter.SseEventBuilder
public SseEmitter.SseEventBuilder name(java.lang.String name)
SseEmitter.SseEventBuilder
name
in interface SseEmitter.SseEventBuilder
public SseEmitter.SseEventBuilder id(java.lang.String id)
SseEmitter.SseEventBuilder
id
in interface SseEmitter.SseEventBuilder
public SseEmitter.SseEventBuilder reconnectTime(long reconnectTimeMillis)
SseEmitter.SseEventBuilder
reconnectTime
in interface SseEmitter.SseEventBuilder
public SseEmitter.SseEventBuilder data(java.lang.Object object)
SseEmitter.SseEventBuilder
data
in interface SseEmitter.SseEventBuilder
public SseEmitter.SseEventBuilder data(java.lang.Object object, MediaType mediaType)
SseEmitter.SseEventBuilder
data
in interface SseEmitter.SseEventBuilder
SseEmitter.SseEventBuilderImpl append(java.lang.String text)
public java.util.Set<ResponseBodyEmitter.DataWithMediaType> build()
SseEmitter.SseEventBuilder
SseEmitter.send(Object, MediaType)
.build
in interface SseEmitter.SseEventBuilder
private void saveAppendedText()