Skip to main content

foundation-comms.connect

Home > @genesislcap/foundation-comms > Connect

Connect interface

Represents a connection and its capabilities on a remote server Provides methods to send and receive messages, as well as metadata and schema information.

Signature:

export interface Connect 

Properties

Property

Modifiers

Type

Description

host

string

isConnected

readonly

boolean

Indicates whether the connection is currently established.

isConnected$?

readonly

Observable<boolean>

(Optional) An Observable that emits a boolean value indicating whether the connection is currently established.

isConnectedSubject?

readonly

BehaviorSubject<boolean>

(Optional) A behavior subject holding the current connection status.

isWorking

boolean

Indicates whether Connect is working or is idle.

Methods

Method

Description

commitEvent(eventName, params)

Sends a request to the server to retrieve data or perform an action.

connect(host)

Connects to a server at the specified host.

dataLogoff(sourceRef)

Logs off from the specified data source.

disconnect()

Disconnects from the server.

getAvailableResources(params)

Sends a request to the server to get available resources.

getJSONSchema(resourceName)

Retrieves the JSON schema for the specified resource.

getMetadata(resourceName, useCache)

Retrieves the metadata for the specified resource.

getMoreColumns(sourceRef)

Requests additional columns for the specified source reference.

getMoreRows(sourceRef, viewNumber)

Requests additional rows of data for the specified source reference.

request(resourceName, params)

Sends a request to the server to retrieve data or perform an action.

snapshot(resourceName, params)

Retrieves a snapshot of data for the specified resource.

stream(resourceName, onMessage, onError, params)

Starts listening for updates on the specified resource.

streamState(resourceName, onMessage, onError, params, initialState)

Starts listening for updates on the specified resource.

streamWithoutAutoTeardown(resourceName, onMessage, onError, params)

(ALPHA) Starts listening for updates on the specified resource without auto-teardown.