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 String
static final String
static final String
static final String
Deprecated.Fields inherited from class io.deephaven.web.client.api.QueryConnectable
connection
Fields 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 TypeMethodDescriptionvoid
close()
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
.getToken()
protected String
void
elemental2.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 anobject
available 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, supportsClientStreaming
Methods 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:
logPrefix
in classHasEventHandling
-
getToken
- Specified by:
getToken
in classQueryConnectable<IdeConnection>
-
getOptions
- Specified by:
getOptions
in classQueryConnectable<IdeConnection>
-
close
public void close()Closes the current connection, releasing any resources on the server or client.- Overrides:
close
in classQueryConnectable<IdeConnection>
-
getServerUrl
The url used when connecting to the server.- Overrides:
getServerUrl
in classQueryConnectable<IdeConnection>
- Returns:
- String.
-
running
Description copied from class:QueryConnectable
Promise that resolves when this worker instance can be connected to, or rejects if it can't be used.- Specified by:
running
in classQueryConnectable<IdeConnection>
- Returns:
- A promise that resolves with this instance.
-
getObject
public elemental2.promise.Promise<?> getObject(@TsTypeRef(JsVariableDescriptor.class) @TsTypeRef(JsVariableDescriptor.class) jsinterop.base.JsPropertyMap<Object> definitionObject) -
notifyServerShutdown
- Specified by:
notifyServerShutdown
in classQueryConnectable<IdeConnection>
-