Packages

final case class ServerSentEvent(data: String, eventType: Option[String] = None, id: Option[String] = None, retry: Option[Int] = None) extends javadsl.model.sse.ServerSentEvent with Product with Serializable

Representation of a server-sent event. By default akka-http uses events with an empty data field as a heartbeat that is ignored on reception. Set akka.http.sse.emit-empty-events can be used to change that default behavior.

data

data, may span multiple lines

eventType

optional type, must not contain \n or \r

id

optional id, must not contain \n or \r

retry

optional reconnection delay in milliseconds

Source
ServerSentEvent.scala
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ServerSentEvent
  2. Serializable
  3. Product
  4. Equals
  5. ServerSentEvent
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ServerSentEvent(data: String, eventType: Option[String] = None, id: Option[String] = None, retry: Option[Int] = None)

    data

    data, may span multiple lines

    eventType

    optional type, must not contain \n or \r

    id

    optional id, must not contain \n or \r

    retry

    optional reconnection delay in milliseconds

Value Members

  1. val data: String
  2. val eventType: Option[String]
  3. def getData(): String

    Data, may span multiple lines.

    Data, may span multiple lines.

    Definition Classes
    ServerSentEventServerSentEvent
  4. def getEventType(): Optional[String]

    Optional type, must not contain \n or \r.

    Optional type, must not contain \n or \r.

    Definition Classes
    ServerSentEventServerSentEvent
  5. def getId(): Optional[String]

    Optional id, must not contain \n or \r.

    Optional id, must not contain \n or \r.

    Definition Classes
    ServerSentEventServerSentEvent
  6. def getRetry(): OptionalInt

    Optional reconnection delay in milliseconds.

    Optional reconnection delay in milliseconds.

    Definition Classes
    ServerSentEventServerSentEvent
  7. val id: Option[String]
  8. def productElementNames: Iterator[String]
    Definition Classes
    Product
  9. val retry: Option[Int]