Home Reference Source
import Datasource from 'proteic/src/datasources/Datasource.js'
public class | source

Datasource

Direct Subclass:

WebsocketDatasource

A Datasource is the name given to the connection set up to a data endpoint. This class defines the common methods for the datasources, such as start() and stop().

Constructor Summary

Public Constructor
public

Creates an instance of Datasource.

Member Summary

Public Members
public

filters: *

Method Summary

Public Methods
public

filter(filter: any): *

Filters the incoming messages.

public

start()

Starts the stream of data

public

stop()

If started, this method stops the stream of data

Public Constructors

public constructor source

Creates an instance of Datasource.

Public Members

public filters: * source

Public Methods

public filter(filter: any): * source

Filters the incoming messages. Each data record that do not comply the filter condition will be discarded

Params:

NameTypeAttributeDescription
filter any

A filter condition

Return:

*

this Datasource instance

public start() source

Starts the stream of data

public stop() source

If started, this method stops the stream of data