Package akka.http.scaladsl.model.sse
Class ServerSentEvent
java.lang.Object
akka.http.javadsl.model.sse.ServerSentEvent
akka.http.scaladsl.model.sse.ServerSentEvent
- All Implemented Interfaces:
Serializable
,scala.Equals
,scala.Product
- See Also:
-
Constructor Summary
ConstructorDescriptionServerSentEvent
(String data, scala.Option<String> eventType, scala.Option<String> id, scala.Option<Object> retry) -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerSentEvent
Creates aServerSentEvent
.static ServerSentEvent
Creates aServerSentEvent
.static ServerSentEvent
Creates aServerSentEvent
.data()
akka.util.ByteString
encode()
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 ServerSentEvent
scala.Option<String>
id()
scala.Option<Object>
retry()
Methods inherited from class akka.http.javadsl.model.sse.ServerSentEvent
create, create, create, create, create
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods 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 akka.util.ByteString encode() -
getData
Description copied from class:ServerSentEvent
Data, may span multiple lines.- Specified by:
getData
in classServerSentEvent
-
getEventType
Description copied from class:ServerSentEvent
Optional type, must not contain \n or \r.- Specified by:
getEventType
in classServerSentEvent
-
getId
Description copied from class:ServerSentEvent
Optional id, must not contain \n or \r.- Specified by:
getId
in classServerSentEvent
-
getRetry
Description copied from class:ServerSentEvent
Optional reconnection delay in milliseconds.- Specified by:
getRetry
in classServerSentEvent
-