- java.lang.Object
-
- com.airepublic.http.sse.api.SseEvent
-
public class SseEvent extends java.lang.ObjectThe representation of an SSE event.- Author:
- Torsten Oltmanns
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSseEvent.BuilderA builder to createSseEvents.
-
Field Summary
Fields Modifier and Type Field Description static longRETRY_NOT_SET
-
Constructor Summary
Constructors Constructor Description SseEvent()Constructor.
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetComment()Gets the event comment.java.lang.StringgetData()Gets the event data.java.lang.StringgetId()Gets the event id.java.lang.StringgetName()Gets the event name.longgetRetry()Gets the event connection retry delay.inthashCode()booleanisReconnectDelaySet()Gets whether a event connection retry delay is set.voidsetComment(java.lang.String comment)Sets the event comment.voidsetData(java.lang.String data)Sets the event data.voidsetId(java.lang.String id)Sets the event id.voidsetName(java.lang.String name)Sets the event name.voidsetRetry(long reconnectDelay)Sets the event connection retry delay.java.lang.StringtoString()
-
-
-
Field Detail
-
RETRY_NOT_SET
public static final long RETRY_NOT_SET
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public java.lang.String getId()
Gets the event id.- Returns:
- the event id
-
setId
public void setId(java.lang.String id)
Sets the event id.- Parameters:
id- the event id
-
getName
public java.lang.String getName()
Gets the event name.- Returns:
- the event name
-
setName
public void setName(java.lang.String name)
Sets the event name.- Parameters:
name- the event name
-
getComment
public java.lang.String getComment()
Gets the event comment.- Returns:
- the event comment
-
setComment
public void setComment(java.lang.String comment)
Sets the event comment.- Parameters:
comment- the event comment
-
getData
public java.lang.String getData()
Gets the event data.- Returns:
- the event data
-
setData
public void setData(java.lang.String data)
Sets the event data.- Parameters:
data- the event data
-
getRetry
public long getRetry()
Gets the event connection retry delay.- Returns:
- the event connection retry delay
-
setRetry
public void setRetry(long reconnectDelay)
Sets the event connection retry delay.- Parameters:
reconnectDelay- the event connection retry delay
-
isReconnectDelaySet
public boolean isReconnectDelaySet()
Gets whether a event connection retry delay is set.- Returns:
- the flag whether the event connection retry delay is set
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-