Package com.illumon.iris.console.utils
Class PreemptiveWidgetUtils
java.lang.Object
com.illumon.iris.console.utils.PreemptiveWidgetUtils
Utility functions for widgets that display data using preemptive tables.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddetachPreemptiveTable(Table table) Unsubscribe from the specified table if it was aReplicatedTablestatic TablehookUpPreemptiveTable(Table table) Attempt to subscribe to aPreemptiveUpdatesTablewithout waiting for the initial data message.static TablehookUpPreemptiveTable(Table table, boolean waitForData) Attempt to subscribe to aPreemptiveUpdatesTableoptionally waiting for the initial data message.static ObjectGet the internal value from the specified object if it was aValueCapsule
-
Constructor Details
-
PreemptiveWidgetUtils
public PreemptiveWidgetUtils()
-
-
Method Details
-
hookUpPreemptiveTable
Attempt to subscribe to aPreemptiveUpdatesTablewithout waiting for the initial data message.- Parameters:
table- the table to subscribe to- Returns:
- a newly subscribed preemptive table, or null if there was a problem
- Throws:
UncheckedTableException- if an error occurs during subscription
-
hookUpPreemptiveTable
public static Table hookUpPreemptiveTable(Table table, boolean waitForData) throws UncheckedTableException Attempt to subscribe to aPreemptiveUpdatesTableoptionally waiting for the initial data message.- Parameters:
table- the table to subscribe towaitForData- if the method should wait for the initial data message before returning- Returns:
- a newly subscribed preemptive table, or null if there was a problem
- Throws:
UncheckedTableException- if an error occurs during subscription
-
detachPreemptiveTable
Unsubscribe from the specified table if it was aReplicatedTable- Parameters:
table- the table to unsubscribe
-
unpackIfValueCapsule
Get the internal value from the specified object if it was aValueCapsule- Parameters:
obj- the object- Returns:
- the unpacked value if it was a capsule, or the input object if it was not.
-