# io.github.libtmux.snapshot.ServerMirror.open

- **Module:** io.github.libtmux.snapshot
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux/src/main/java/io/github/libtmux/snapshot/ServerMirror.java#L96
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-snapshot-servermirror-servermirror-open/

```
io.github.libtmux.snapshot.ServerMirror.open(anchor: Session) -> ServerMirror

io.github.libtmux.snapshot.ServerMirror.open(anchor: Session, refreshEvery: Duration) -> ServerMirror
```

Mirrors the server {@code anchor} belongs to, listening through a control client attached to {@code anchor}.

## Parameters

- `refreshEvery` (`Duration`): how long a quiet mirror waits before rebuilding anyway; zero never does (for `open(anchor, refreshEvery)`)

## Raises

- [`TargetGoneException`](/en/java/latest/reference/io-github-libtmux-exception-targetgoneexception-targetgoneexception/): if the anchor session or its server has gone (for `open(anchor)`)
- [`IllegalArgumentException`](https://docs.oracle.com/en/java/javase/21/docs/api/java/lang/IllegalArgumentException.html): if {@code refreshEvery} is negative (for `open(anchor, refreshEvery)`)
