Interface SseEvent
- All Known Subinterfaces:
- InboundSseEvent,- OutboundSseEvent
public interface SseEvent
This interface provides basic properties of the Server Sent Event, namely ID, Name, and Comment. It also provides access to the Reconnect delay property.
 SseEvent is extended by another two interfaces, InboundSseEvent and OutboundSseEvent. The
 main difference is in how are instances created and how the stored data can be accessed (or provided).
- Since:
- 2.1
- Author:
- Marek Potociar
- 
Field SummaryFields Modifier and Type Field Description static longRECONNECT_NOT_SETA "reconnection not set" value for the SSE reconnect delay set via SSE eventretryfield.
- 
Method SummaryModifier and Type Method Description StringgetComment()Get a comment string that accompanies the event.StringgetId()Get event identifier.StringgetName()Get event name.longgetReconnectDelay()Get new connection retry time in milliseconds the event receiver should wait before attempting to reconnect after a connection to the SSE event source is lost.booleanisReconnectDelaySet()Check if the connection retry time has been set in the event.
- 
Field Details- 
RECONNECT_NOT_SETstatic final long RECONNECT_NOT_SETA "reconnection not set" value for the SSE reconnect delay set via SSE eventretryfield.- See Also:
- Constant Field Values
 
 
- 
- 
Method Details- 
getIdString getId()Get event identifier.Contains value of SSE "id"field. This field is optional. Method may returnnull, if the event identifier is not specified.- Returns:
- event id.
 
- 
getNameString getName()Get event name.Contains value of SSE "event"field. This field is optional. Method may returnnull, if the event name is not specified.- Returns:
- event name, or nullif not set.
 
- 
getCommentString getComment()Get a comment string that accompanies the event.Contains value of the comment associated with SSE event. This field is optional. Method may return null, if the event comment is not specified.- Returns:
- comment associated with the event.
 
- 
getReconnectDelaylong getReconnectDelay()Get new connection retry time in milliseconds the event receiver should wait before attempting to reconnect after a connection to the SSE event source is lost.Contains value of SSE "retry"field. This field is optional. Method returnsRECONNECT_NOT_SETif no value has been set.- Returns:
- reconnection delay in milliseconds or RECONNECT_NOT_SETif no value has been set.
 
- 
isReconnectDelaySetboolean isReconnectDelaySet()Check if the connection retry time has been set in the event.- Returns:
- trueif new reconnection delay has been set in the event,- falseotherwise.
 
 
-