ConnectedLifecycleContext
class ConnectedLifecycleContext(connectionId: Long, lifecycleId: Long)Coordinates one connected LiveView lifecycle without exposing application or protocol data.
Parameters
connectionIdThe ID of the WebSocket connection. Root and nested LiveViews joined over the same WebSocket share it, and a reconnect gets a new one.
lifecycleIdThe ID of the LiveView lifecycle, unique on its connection. A LiveView's first connected lifecycle on a connection reuses the ID issued by its disconnected render, so the ID stays the same across reconnects; combine it with
connectionIdto tell connections apart. A rejoin after a crash and a LiveView reached by live navigation get a new ID.
Defined by scalive.ConnectedLifecycleContext. View source (scalive/api/src/scalive/LifecycleObserver.scala:49-51)
Values2
connectionId
val connectionId: LongThe ID of the WebSocket connection. Root and nested LiveViews joined over the same WebSocket share it, and a reconnect gets a new one.
Defined by scalive.ConnectedLifecycleContext.connectionId. View source (scalive/api/src/scalive/LifecycleObserver.scala:50-50)
lifecycleId
val lifecycleId: LongThe ID of the LiveView lifecycle, unique on its connection. A LiveView's first connected
lifecycle on a connection reuses the ID issued by its disconnected render, so the ID stays the
same across reconnects; combine it with connectionId to tell connections apart. A rejoin
after a crash and a LiveView reached by live navigation get a new ID.
Defined by scalive.ConnectedLifecycleContext.lifecycleId. View source (scalive/api/src/scalive/LifecycleObserver.scala:51-51)