HTTPDatasource
Extends:
This datasource set up a connection to a http server.
Constructor Summary
| Public Constructor | ||
| public | 
       constructor(source: any) Creates an instance of HTTPDatasource.  | 
    |
Member Summary
| Public Members | ||
| public | 
       dispatcher: *  | 
    |
| public | 
       intervalId: *  | 
    |
| public | 
       source: *  | 
    |
| public | 
      
       | 
    |
Method Summary
| Public Methods | ||
| public | 
       configure(dispatcher: any) Configure a dispatcher for this datasource.  | 
    |
| public | 
       start() Initialize an HTTP connection  | 
    |
| public | 
       stop() If started, this method close the HTTP connection.  | 
    |
Inherited Summary
| From class Datasource | ||
| public | 
       filters: *  | 
    |
| public | 
       properties: *  | 
    |
| public | 
       convert(data: *): *  | 
    |
| public | 
       filter(filter: any): * Filters the incoming messages.  | 
    |
| public | 
       property(prop: *, newProp: *, cast: *): *  | 
    |
| public | 
       start() Starts the stream of data  | 
    |
| public | 
       stop() If started, this method stops the stream of data  | 
    |
Public Constructors
public constructor(source: any) source
Creates an instance of HTTPDatasource. This datasource will try to connect to the speficied HTTP endpoint.
   var source = {
     endpoint: 'https://randomuser.me/api';
   };
   linechart = new proteic.Linechart(new proteic.HTTPwDatasource(source));
If new data is available, this datasource will forward the data records to the chart, which automatically repaint the chart with these new records.
Override:
Datasource#constructorParams:
| Name | Type | Attribute | Description | 
| source | any | An http endpoint. If invalid, this class will throw an Error.  | 
    
Public Methods
public configure(dispatcher: any) source
Configure a dispatcher for this datasource.
Params:
| Name | Type | Attribute | Description | 
| dispatcher | any | A d3 dispatcher. This dispatcher is in charge of receiving and sending events.  |