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
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.elemental2.promise.Promise<?>getObject(@TsTypeRef(JsVariableDescriptor.class) jsinterop.base.JsPropertyMap<Object> definitionObject) The url used when connecting to the server.elemental2.promise.Promise<?>getSharedObject(SharedExportBytesUnion sharedTicketBytes, String type) Reads an object shared by another client to this server with thesharedTicketBytes.elemental2.promise.Promise<JsTable>Deprecated.Added to resolve a specific issue, in the future preview will be applied as part of the subscription.getToken()protected Stringelemental2.promise.Promise<JsTable>mergeTables(JsTable[] tables) Merges the given tables into a single table.elemental2.promise.Promise<JsTable>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, createClient, disconnected, getConsoleTypes, getWorkerHeapInfo, makeRpcOptions, 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 elemental2.promise.Promise<JsTable> getTable(String name, @JsOptional 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 fetchapplyPreviewColumns- false to disable previews, defaults to true- Returns:
- a
Promisethat will resolve to the table, or reject with an error if it cannot be loaded.
-
getObject
public elemental2.promise.Promise<?> getObject(@TsTypeRef(JsVariableDescriptor.class) @TsTypeRef(JsVariableDescriptor.class) jsinterop.base.JsPropertyMap<Object> definitionObject) -
notifyServerShutdown
- Specified by:
notifyServerShutdownin classQueryConnectable<IdeConnection>
-
newTable
-
mergeTables
Merges the given tables into a single table. Assumes all tables have the same structure.- Parameters:
tables-- Returns:
PromiseofJsTable
-