Constructor
new DocumentStreamConnector(assignedStreamName, rootElement, streamServerUrl, wicaStreamProperties, wicaElementConnectionAttributes)
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
module:document-stream-connector.DocumentStreamConnector#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 module:shared-definitions.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 module:shared-definitions.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: module:document-stream-connector.DocumentStreamConnector#activate.
shutdown()
Shuts down the service offered by this class.
See also: module:document-stream-connector.DocumentStreamConnector#shutdown.