Constructor
new AggHouse(optionalConfigs)
Initialize an AggHouse.
Parameters:
Name | Type | Description |
---|---|---|
optionalConfigs |
Object | Optional configurations. |
- Source:
Methods
getConfig(name) → {*}
Get a configuration value.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Configuration name. |
- Source:
Returns:
Configuration value.
- Type
- *
getData(aggregatorName) → (non-null) {Object}
Get data of an aggregator.
Parameters:
Name | Type | Description |
---|---|---|
aggregatorName |
string | Name of aggregator name to get data from. |
- Source:
Throws:
-
Throw an error if an aggregator of give name has not been loaded.
- Type
- AggHouseInvalidArgumentError
Returns:
Aggregator data.
- Type
- Object
getLoadedAggregators() → (non-null) {Array.<Object>}
Get a list of names and versions of loaded aggregators.
- Source:
Returns:
- Type
- Array.<Object>
loadAggregator(aggregatornon-null)
Create an AggRoom for an aggregator add it to control list.
Parameters:
Name | Type | Description |
---|---|---|
aggregator |
Aggregator | Aggregator to load. |
- Source:
Throws:
-
Throw an error if an aggregator of the same name is already loaded.
- Type
- AggHouseInvalidArgumentError
processUpdate(updatenon-null, classId)
Process incoming update and deliver them to corresponding aggregators.
Parameters:
Name | Type | Description |
---|---|---|
update |
Object | Update data. |
classId |
number | Class ID for data. |
- Source:
unloadAggregator(aggregator)
Unload an aggregator and dispose its AggRoom.
Parameters:
Name | Type | Description |
---|---|---|
aggregator |
Aggregator | string | The aggregator to unload. |
- Source:
updateData(aggregatorName, newData, isAppending)
Update data produced by an aggregator.
Parameters:
Name | Type | Description |
---|---|---|
aggregatorName |
string | Name of aggregator name to get data from. |
newData |
string | New data from aggregator. |
isAppending |
boolean | null | If is appending to or replacing original. |
- Source:
Throws:
-
Throw an error if an aggregator of give name has not been loaded.
- Type
- AggHouseInvalidArgumentError