Constructor
new Service(connection, serviceId)
Creates an object representing a secondary web service stored at the back-end.
Parameters:
Name | Type | Description |
---|---|---|
connection |
Connection | A Connection object representing an established connection to an openEO back-end. |
serviceId |
string | The service ID. |
- Source:
Extends
Methods
debugService() → {Logs}
Get logs for the secondary web service from the back-end.
- Source:
Returns:
- Type
- Logs
(async) deleteService()
Deletes the secondary web service from the back-end.
- Source:
Throws:
(async) describeService() → {Service}
Updates the data stored in this object by requesting the secondary web service metadata from the back-end.
- Source:
Throws:
Returns:
The updates service object (this).
- Type
- Service
get(name) → {*}
Get a value from the additional data that is not part of the core model, i.e. from proprietary extensions.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the property. |
- Overrides:
- Source:
Returns:
The value, which could be of any type.
- Type
- *
getAll() → {object}
Returns all data in the model.
- Overrides:
- Source:
Returns:
- Type
- object
monitorService(callback, intervalopt) → {function}
Checks for new log entries every x seconds.
On every status change (enabled/disabled) observed or on new log entries (if supported by the back-end), the callback is executed. It is also executed once at the beginning. The callback receives the service (this object) and the logs (array) passed.
Returns a function that can be called to stop monitoring the service manually. The monitoring must be stopped manually, otherwise it runs forever.
This is only supported if describeService is supported by the back-end.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
callback |
function | |||
interval |
integer |
<optional> |
60 |
- Source:
Throws:
Returns:
- Type
- function
setAll(metadata) → {this}
Converts the data from an API response into data suitable for our JS client models.
Parameters:
Name | Type | Description |
---|---|---|
metadata |
object | JSON object originating from an API response. |
- Overrides:
- Source:
Returns:
Returns the object itself.
- Type
- this
(async) updateService(parameters) → {Service}
Modifies the secondary web service at the back-end and afterwards updates this object, too.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
object | An object with properties to update, each of them is optional, but at least one of them must be specified. Additional properties can be set if the server supports them. Properties
|
- Source:
Throws:
Returns:
The updated service object (this).
- Type
- Service