# io.github.libtmux.Client.Client.refresh

- **Module:** io.github.libtmux.Client.Client
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/Client.java#L116
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-client-client-refresh/

```
io.github.libtmux.Client.Client.refresh() -> Optional<Client>
```

Takes a new capture and returns this client as it is now, or empty if it has gone.

This handle remains unchanged. Empty means this client detached while the same daemon
remained reachable; failed capture still throws.

## Raises

- `ObjectDoesNotExistException`: if a different daemon answers on the endpoint
- `ServerNotRunningException`: if no daemon is running
