Package one.nio.http
Interface EventSource.Event<D>
-
- All Known Implementing Classes:
HttpClient.EventImpl
- Enclosing interface:
- EventSource<D>
public static interface EventSource.Event<D>A single Server Sent Event, received from peer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringcomment()an SSE comment concatenatedDdata()an SSE "data" line.java.lang.Stringid()an SSE event id.booleanisEmpty()No name, id and data in event ( only comment )java.lang.Stringname()an SSE event name
-
-
-
Method Detail
-
isEmpty
boolean isEmpty()
No name, id and data in event ( only comment )- Returns:
- true, if the event has no name, id and data. false, otherwise
-
name
java.lang.String name()
an SSE event name- Returns:
- the event name
-
id
java.lang.String id()
an SSE event id. this can be used to request events starting from specified- Returns:
- the event id
- See Also:
- HTML Standard: 9.2.4 The `Last-Event-ID` header
-
data
D data()
an SSE "data" line.- Returns:
- the event data
-
comment
java.lang.String comment()
an SSE comment concatenated- Returns:
- the event comment
-
-