Class WorkerConnection

java.lang.Object
io.deephaven.web.client.api.WorkerConnection

@TsIgnore public class WorkerConnection extends Object
Non-exported class, manages the connection to a given worker server. Exported types like QueryInfo and Table will refer to this, and allow us to try to keep track of how many open tables there are, so we can close the connection if not in use. Might make more sense to be part of QueryInfo, but this way we can WeakMap instances, check periodically if any QueryInfos are left alive or event handlers still exist, and close connections that seem unused. Except for the delegated call from QueryInfo.getTable, none of these calls will be possible in Connecting or Disconnected state if done right. Failed state is possible, and we will want to think more about handling, possible re-Promise-ing all of the things, or just return stale values if we have them. Responsible for reconnecting to the query server when required - when that server disappears, and at least one table is left un-closed.