ConnectionManagementSessionMixin
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements for concepts. Built into JBrowse core. View source.
Properties
| Member | Description |
|---|---|
| connectionInstances | |
| connectionTrackConfigs | Persisted configs of connection tracks the user has opened, keyed by trackId. Unlike connectionInstances (stripped from snapshots, holds the whole fetched hub), this holds only the tracks in use, so an open connection track resolves synchronously on session load without re-establishing the connection. |
Getters
| Member | Description |
|---|---|
| connections |
Actions
| Member | Description |
|---|---|
| makeConnection | |
| breakConnection | Remove a live connection instance. Tolerant of an already-dormant connection (its instance is stripped from the session on reload). Leaves persisted open-track configs alone — the connect() error path calls this and the user's already-open tracks must survive a transient failure. Full removal goes through deleteConnection. |
| teardownConnection | Close every track a connection contributed — the live instance's tracks plus any persisted open-track configs (a dormant connection, never expanded this session, still renders its opened tracks from connectionTrackConfigs) — from all views/widgets, drop the live instance, and drop the persisted configs. The session is left as if the connection had never loaded. |
| deleteConnection | Fully remove a connection: tear down its tracks and live instance, then delete its config. |
addConnectionConf(connectionConf: AnyConfiguration) => any | Adds to the config, not the session: jbrowse.connections, which every visitor to this instance loads. jbrowse-web overrides this so a non-admin's connection lands in sessionConnections instead — see WebSessionConnectionsMixin, whose addSessionConnectionConf is what to call when you mean the session specifically rather than "wherever this user's edits go".Applications without that override (Desktop, the embedded products) have only this one destination, and it is the right one there: their config and session are saved as a single document. |
clearConnections() => void | |
captureConnectionTrack(trackId: string) => void | Snapshot a just-opened connection track's config into connectionTrackConfigs so it survives session reload. No-op if the track isn't connection-provided or is already captured (edits go through updateConnectionTrackConfig). |
| updateConnectionTrackConfig | Persist an edit to an opened connection track. The full config is stored (not a delta): the connection's fetched "base" isn't present at load, so only a complete config resolves synchronously. |
| setConnectionTrackConfig | Upsert one opened connection track's persisted config. |
pruneConnectionTrackConfig(trackId: string) => void | Drop a connection track's persisted config once no open view still references it, so the session doesn't accumulate closed tracks. |
hydrateConnection(connectionId: string) => void | Lazily establish a single connection by id if it isn't already live — used when its category is expanded in the track selector. Fetches silently (no view launch / success snackbar); already-open tracks keep rendering from connectionTrackConfigs meanwhile. Idempotent. |