Class: DocumentStreamConnector

document-stream-connector.DocumentStreamConnector(assignedStreamNamenon-null, rootElementnon-null, streamServerUrlnon-null, wicaStreamPropertiesnon-null, wicaElementConnectionAttributesnon-null)

Provides real-time updates to wica channel elements in the supplied document tree based on information streamed from the Wica server on the backend.

Constructor

new DocumentStreamConnector(assignedStreamNamenon-null, rootElementnon-null, streamServerUrlnon-null, wicaStreamPropertiesnon-null, wicaElementConnectionAttributesnon-null)

Constructs a new instance to work with the specified backend server. The returned object will remain in a dormant state until triggered by a call to the activate method.
Parameters:
Name Type Description
assignedStreamName string The name of this stream (which will be reflected on each wica channel element)
rootElement Element the root of the document tree to be searched when looking for wica channel elements.
streamServerUrl string The URL of the backend server from whom information is to be obtained.
wicaStreamProperties module:shared-definitions.WicaStreamProperties The properties of the stream that will be created to obtain the required information from the data sources. See WicaStreamProperties.
wicaElementConnectionAttributes module:shared-definitions.WicaElementConnectionAttributes The names of the wica html element attributes that are to be used in the wica communication process. See WicaElementConnectionAttributes.

Methods

activate()

Scans the specified document tree for wica channel elements, creates a stream on the Wica backend server to obtain information from each element's data source, sets up handlers to update each element's attributes on as fresh information is received. See also: shutdown.

shutdown()

Shuts down the service offered by this class. See also: activate.