Class ServerSentEvent
java.lang.Object
org.apache.pekko.http.javadsl.model.sse.ServerSentEvent
org.apache.pekko.http.scaladsl.model.sse.ServerSentEvent
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionServerSentEvent(String data, scala.Option<String> eventType, scala.Option<String> id, scala.Option<Object> retry) -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerSentEventCreates aServerSentEvent.static ServerSentEventCreates aServerSentEvent.static ServerSentEventCreates aServerSentEvent.data()org.apache.pekko.util.ByteStringencode()scala.Option<String>getData()Data, may span multiple lines.Optional type, must not contain \n or \r.getId()Optional id, must not contain \n or \r.getRetry()Optional reconnection delay in milliseconds.static ServerSentEventscala.Option<String>id()scala.Option<Object>retry()Methods inherited from class org.apache.pekko.http.javadsl.model.sse.ServerSentEvent
create, create, create, create, createMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
ServerSentEvent
-
-
Method Details
-
heartbeat
-
apply
Creates aServerSentEvent.- Parameters:
data- data, may span multiple linestype- type, must not contain \n or \r- Returns:
- (undocumented)
-
apply
Creates aServerSentEvent.- Parameters:
data- data, may span multiple linestype- type, must not contain \n or \rid- id, must not contain \n or \r- Returns:
- (undocumented)
-
apply
Creates aServerSentEvent.- Parameters:
data- data, may span multiple linesretry- reconnection delay in milliseconds- Returns:
- (undocumented)
-
data
-
eventType
-
id
-
retry
-
encode
public org.apache.pekko.util.ByteString encode() -
getData
Description copied from class:ServerSentEventData, may span multiple lines.- Specified by:
getDatain classServerSentEvent
-
getEventType
Description copied from class:ServerSentEventOptional type, must not contain \n or \r.- Specified by:
getEventTypein classServerSentEvent
-
getId
Description copied from class:ServerSentEventOptional id, must not contain \n or \r.- Specified by:
getIdin classServerSentEvent
-
getRetry
Description copied from class:ServerSentEventOptional reconnection delay in milliseconds.- Specified by:
getRetryin classServerSentEvent
-