# io.github.libtmux.scaladsl.live.LiveView

- **Module:** io.github.libtmux.scaladsl.live
- **Package:** io.github.libtmux:libtmux-scala_3
- **Language:** Scala
- **Kind:** typealias
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux-scala/src/main/scala/io/github/libtmux/scaladsl/live/LiveView.scala#L16
- **Page:** https://libtmux.org/en/scala/latest/reference/io-github-libtmux-scaladsl-live-liveview/

```
opaque type LiveView <: AutoCloseable = JavaServerMirror

object LiveView
```

A live view of one tmux server's sessions, windows, panes and clients, opaque over Java's own [[io.github.libtmux.snapshot.ServerMirror ServerMirror]] — re-snapshotting on notification, on a gap and on reconnect is entirely Java's job; this only wraps it, rather than re-deriving resnapshot-on-notification from a raw control subscription. `close()` comes from the `AutoCloseable` bound with no forwarding of its own.

## Members

### Other members

- `asJava` (method): The underlying Java mirror. Opaque wrapping is free, so this never copies scope or state.
- `attach` (method): Listens through a control client attached to `anchor`, rebuilding on every announcement.
- `awaitNewer` (method): Waits for a view newer than `epoch`, or empty when `timeout` passed first or this mirror ended; [[isEnded]] and [[cause]] tell those apart.
- `cause` (method): Why this mirror ended, when something other than [[java.lang.AutoCloseable#close close]] ended it.
- `current` (method): The latest published view. Never blocks.
- `isEnded` (method): Whether this mirror has stopped publishing, because it was closed or its anchor has gone.
- `snapshots` (method): The current view, then every newer one, one per notification, blocking between them: as a `StateFlow` or an fs2 `Signal` does. A change made before this call is in the first view rather than lost between reading [[current]] and starting to iterate. Ends when this view is closed, and throws [[cause]] when its anchor or server has gone.
- `snapshotsAfter` (method): Every view newer than `epoch`, one per notification, blocking between them. A view already published after `epoch` comes first, so nothing is missed between reading a view and starting to iterate. Ends and throws as [[snapshots]] does.
