Class TableSubscription

All Implemented Interfaces:
Revivable

@JsType(namespace="dh") public final class TableSubscription extends AbstractTableSubscription
Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.

Unlike TableViewportSubscription, the "original" table does not have a reference to this instance, only the "private" table instance does, since the original cannot modify the subscription, and the private instance must forward data to it.

Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the subscription must be closed and a new one optioned to see those changes. The event model is slightly different from viewports to make it less expensive to compute for large tables.

  • Field Details

    • EVENT_DISCONNECT

      public static final String EVENT_DISCONNECT
      The connection to the server was lost. No updated events fire until it is back. The subscription is re-sent automatically; EVENT_RECONNECT fires when the server reconnects, or EVENT_RECONNECTFAILED fires if it cannot.
      See Also:
    • EVENT_RECONNECT

      public static final String EVENT_RECONNECT
      The connection is back and the subscription has been re-sent to the server; data follows in updated events.
      See Also:
    • EVENT_RECONNECTFAILED

      public static final String EVENT_RECONNECTFAILED
      The server-side table this subscription reads could not be re-established after a reconnect. The subscription is closed; create a new one from a live table. event.detail describes the failure. This says nothing about the connection as a whole.
      See Also:
    • EVENT_REQUEST_FAILED

      public static final String EVENT_REQUEST_FAILED
      The server ended this subscription with an error; event.detail is the server's message. The subscription is closed and no more data will come; such failures are not recoverable, create a new subscription.
      See Also:
  • Method Details