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 boolean
equals(java.lang.Object o)
java.lang.String
getText()
Returns the comment text, not including the leading colon.int
hashCode()
java.lang.String
toString()
-
-
-
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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-