Constructor
new DataSource(name, properties, worker)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | the datasource name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
properties |
Object | the datasource properties
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
worker |
Object | DataSource worker |
- Source:
Methods
(async) connect()
Connect the dataSource then the protocol will be opened as well.
- Source:
disconnect()
Disconnect the dataSource then the protocol will be closed as well.
- Source:
getId() → {String}
Gets the datasource id.
- Source:
Returns:
the datasource id
- Type
- String
getName() → {String}
Gets the datasource name.
- Source:
Returns:
the datasource name
- Type
- String
(protected) initDataSource(properties)
Inits the datasource with the constructor properties.
Parameters:
Name | Type | Description |
---|---|---|
properties |
- Source:
onDisconnect()
Trigger when the datasource is disconnected for some reason.
- Source:
updateProperties(name, properties)
Update properties
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | the datasource name | |||||||||||||||||||||||||||||||||
properties |
Object | the datasource properties
Properties
|
- Source: