Package com.launchdarkly.eventsource
Class CommentEvent
- java.lang.Object
-
- com.launchdarkly.eventsource.CommentEvent
-
- All Implemented Interfaces:
StreamEvent
public final class CommentEvent extends java.lang.Object implements StreamEvent
Describes a comment line received from the stream.An SSE comment is a line that starts with a colon. There is no defined meaning for this in the SSE specification, and most clients ignore it. It may be used to provide a periodic heartbeat from the server to keep connections from timing out.
- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description CommentEvent(java.lang.String text)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetText()Returns the comment text, not including the leading colon.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getText
public java.lang.String getText()
Returns the comment text, not including the leading colon.- Returns:
- the text
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-