Package io.deephaven.web.client.ide
Class IdeConnection
java.lang.Object
io.deephaven.web.client.api.event.HasEventHandling
io.deephaven.web.client.api.QueryConnectable<IdeConnection>
io.deephaven.web.client.ide.IdeConnection
Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
some options, JS applications can run code on the server and interact with available exportable objects.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.web.client.api.event.HasEventHandling
HasEventHandling.EventPair<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.Fields inherited from class io.deephaven.web.client.api.QueryConnectable
authenticationInterceptor, connectionFields inherited from class io.deephaven.web.client.api.event.HasEventHandling
INTERNAL_EVENT_RELEASED -
Constructor Summary
ConstructorsConstructorDescriptionIdeConnection(String serverUrl, Object connectOptions) Creates a new instance, from which console sessions can be made. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the current connection, releasing any resources on the server or client.getObject(@TsTypeRef(JsVariableDescriptor.class) jsinterop.base.JsPropertyMap<Object> definitionObject) Fetches the object a variable descriptor names.The url used when connecting to the server.getSharedObject(SharedExportBytesUnion sharedTicketBytes, String type) Reads an object shared by another client to this server with thesharedTicketBytes.Deprecated.Added to resolve a specific issue, in the future preview will be applied as part of the subscription.getToken()protected StringmergeTables(elemental2.core.ReadonlyArray<JsTableReference> tables) Merges the given tables into a single table.Creates a table on the server from the given column data.voidelemental2.promise.Promise<IdeConnection> running()Promise that resolves when this worker instance can be connected to, or rejects if it can't be used.elemental2.promise.Promise<SharedExportBytesUnion> shareObject(ServerObject.Union object, SharedExportBytesUnion sharedTicketBytes) Makes anobjectavailable to another user or another client on this same server which knows the value of thesharedTicketBytes.subscribeToFieldUpdates(JsConsumer<JsVariableChanges> callback) Methods inherited from class io.deephaven.web.client.api.QueryConnectable
connected, createStub, createStubNoAuth, disconnected, getConsoleTypes, getWorkerHeapInfo, login, logout, notifyConnectionError, notifyConnectionError, onConnected, onLogMessage, onReady, startSession, supportsClientStreamingMethods inherited from class io.deephaven.web.client.api.event.HasEventHandling
addEventListener, addEventListenerOneShot, addEventListenerOneShot, failureHandled, fireCriticalEvent, fireCriticalEvent, fireEvent, fireEvent, fireEvent, hasListener, hasListeners, isSuppress, nextEvent, removeEventListener, suppressEvents, unsuppressEvents
-
Field Details
-
HACK_CONNECTION_FAILURE
Deprecated.- See Also:
-
EVENT_DISCONNECT
- See Also:
-
EVENT_RECONNECT
- See Also:
-
EVENT_SHUTDOWN
- See Also:
-
-
Constructor Details
-
IdeConnection
Creates a new instance, from which console sessions can be made.- Parameters:
serverUrl- The url used when connecting to the server. Read-only.connectOptions- Optional Object
-
-
Method Details
-
logPrefix
- Overrides:
logPrefixin classHasEventHandling
-
getToken
- Specified by:
getTokenin classQueryConnectable<IdeConnection>
-
getOptions
- Specified by:
getOptionsin classQueryConnectable<IdeConnection>
-
close
public void close()Closes the current connection, releasing any resources on the server or client.- Overrides:
closein classQueryConnectable<IdeConnection>
-
getServerUrl
The url used when connecting to the server.- Overrides:
getServerUrlin classQueryConnectable<IdeConnection>- Returns:
- String.
-
running
Description copied from class:QueryConnectablePromise that resolves when this worker instance can be connected to, or rejects if it can't be used.- Specified by:
runningin classQueryConnectable<IdeConnection>- Returns:
- A promise that resolves with this instance.
-
getTable
@Deprecated public JsPendingTable<JsTable> getTable(String name, @JsOptional @JsNullable Boolean applyPreviewColumns) Deprecated.Added to resolve a specific issue, in the future preview will be applied as part of the subscription.Load the named table, with columns and size information already fully populated.- Parameters:
name- the name of the table to fetch.applyPreviewColumns-falseto disable previews. Defaults totrue.- Returns:
- the table, as a pending table that rejects with an error if it cannot be loaded
-
getObject
public JsPendingObject getObject(@TsTypeRef(JsVariableDescriptor.class) @TsTypeRef(JsVariableDescriptor.class) jsinterop.base.JsPropertyMap<Object> definitionObject) Fetches the object a variable descriptor names.- Parameters:
definitionObject- the variable descriptor- Returns:
- a pending table if the object is a table, otherwise a promise of the object
-
notifyServerShutdown
- Specified by:
notifyServerShutdownin classQueryConnectable<IdeConnection>
-
newTable
public JsPendingTable<JsTable> newTable(String[] columnNames, String[] types, String[][] data, String userTimeZone) Creates a table on the server from the given column data.- Parameters:
columnNames- the name of each columntypes- the type of each columndata- the values of each column, as stringsuserTimeZone- the time zone to read date-time values in- Returns:
- the new table, as a pending table
-
mergeTables
Merges the given tables into a single table. Assumes all tables have the same structure.- Parameters:
tables- the tables to merge, which must have the same columns and be from this connection- Returns:
- the merged table, as a pending table
-