Package org.springframework.http.codec
Class ServerSentEvent<T>
java.lang.Object
org.springframework.http.codec.ServerSentEvent<T>
- Type Parameters:
- T- the type of data that this event contains
Representation for a Server-Sent Event for use with Spring's reactive Web support.
 
Flux<ServerSentEvent> or Observable<ServerSentEvent> is the
 reactive equivalent to Spring MVC's SseEmitter.- Since:
- 5.0
- Author:
- Sebastien Deleuze, Arjen Poutsma
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceA mutable builder for aServerSentEvent.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> ServerSentEvent.Builder<T>builder()Return a builder for aServerSentEvent.static <T> ServerSentEvent.Builder<T>builder(T data) Return a builder for aServerSentEvent, populated with the given data.comment()Return the comment of this event, if available.data()Return thedatafield of this event, if available.booleanevent()Return theeventfield of this event, if available.inthashCode()id()Return theidfield of this event, if available.retry()Return theretryfield of this event, if available.toString()
- 
Method Details- 
idReturn theidfield of this event, if available.
- 
eventReturn theeventfield of this event, if available.
- 
retryReturn theretryfield of this event, if available.
- 
commentReturn the comment of this event, if available.
- 
dataReturn thedatafield of this event, if available.
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
- 
builderReturn a builder for aServerSentEvent.- Type Parameters:
- T- the type of data that this event contains
- Returns:
- the builder
 
- 
builderReturn a builder for aServerSentEvent, populated with the given data.- Type Parameters:
- T- the type of data that this event contains
- Returns:
- the builder
 
 
-