AbstractThirdPartyApplicationService
On this page
- AbstractThirdPartyApplicationService ⇐
Abstract
- AbstractThirdPartyApplicationService()
- init() ⇒
Promise.<Array, Error>
- getApplicationList(options) ⇒
Promise.<Array, Error>
- getApplicationById(id) ⇒
Application
- start(application, options) ⇒
Promise
- stop(application, options) ⇒
Promise.<Boolean, Error>
- getInformation(application, options) ⇒
Promise.<Object, Error>
- reset(application, options) ⇒
Promise.<Boolean, Error>
- getApplicationByChannelId(channelId, options) ⇒
Promise.<Application, Error>
- _init() ⇒
Promise.<Array, Error>
- _getApplicationList(options) ⇒
Promise.<Array, Error>
- _start(application, options) ⇒
Promise.<Boolean, Error>
- _stop(application, options) ⇒
Promise.<Boolean, Error>
- _getInformation(application, options) ⇒
Promise.<Object, Error>
- _reset(application, options) ⇒
Promise.<Boolean, Error>
- _getApplicationByChannelId(channelId, options) ⇒
Promise.<Application, Error>
- _onStart(application) ⇒
Promise
- _onStop(application, options) ⇒
Promise
- _onReset(application) ⇒
Promise
- _onError(application, error) ⇒
Promise
- “applicationStart” (application)
- “applicationError” (application, error)
- “applicationReset” (application)
- “applicationStop” (application)
- “applicationLaunch”
AbstractThirdPartyApplicationService ⇐ Abstract
Kind: global abstract class
Extends: Abstract
Mixes: MServiceCache
Service:
Properties
Name | Type | Description |
---|---|---|
applicationList | Array.<ThirdPartyApplication> | the list of available application |
- AbstractThirdPartyApplicationService ⇐
Abstract
- new AbstractThirdPartyApplicationService()
- .init() ⇒
Promise.<Array, Error>
- .getApplicationList(options) ⇒
Promise.<Array, Error>
- .getApplicationById(id) ⇒
Application
- .start(application, options) ⇒
Promise
- .stop(application, options) ⇒
Promise.<Boolean, Error>
- .getInformation(application, options) ⇒
Promise.<Object, Error>
- .reset(application, options) ⇒
Promise.<Boolean, Error>
- .getApplicationByChannelId(channelId, options) ⇒
Promise.<Application, Error>
- ._init() ⇒
Promise.<Array, Error>
- ._getApplicationList(options) ⇒
Promise.<Array, Error>
- ._start(application, options) ⇒
Promise.<Boolean, Error>
- ._stop(application, options) ⇒
Promise.<Boolean, Error>
- ._getInformation(application, options) ⇒
Promise.<Object, Error>
- ._reset(application, options) ⇒
Promise.<Boolean, Error>
- ._getApplicationByChannelId(channelId, options) ⇒
Promise.<Application, Error>
- ._onStart(application) ⇒
Promise
- ._onStop(application, options) ⇒
Promise
- ._onReset(application) ⇒
Promise
- ._onError(application, error) ⇒
Promise
- “applicationStart” (application)
- “applicationError” (application, error)
- “applicationReset” (application)
- “applicationStop” (application)
- “applicationLaunch”
AbstractThirdPartyApplicationService()
A service to control third party apps (start, stop, …)
init() ⇒ Promise.<Array, Error>
Init the service (listen events…)
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Promise.<Array, Error>
- A promise resolved to a list of Applications
getApplicationList(options) ⇒ Promise.<Array, Error>
Get the Application list
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Promise.<Array, Error>
- A promise resolved to a list of Applications
Param | Type | Default | Description |
---|---|---|---|
options | Map | Additional options | |
[options.force] | boolean | false | If true, don't use the cache |
[options.duration] | number |
| Duration in milliseconds before invalidation of cache (if null, $$maxAge value is used by default) |
getApplicationById(id) ⇒ Application
Returns the application corresponding to the given ID.
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Application
- Returns the application corresponding to the given ID
Param | Type | Description |
---|---|---|
id | string | The application ID you want to get |
start(application, options) ⇒ Promise
Start the application
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Promise
- A promise resolved if application has been started
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the application to start |
options | Map | Additional options |
[options.args] | Array | Extra parameters to pass to third app at launch (will we added to params from ThirdPartyApplication model) |
stop(application, options) ⇒ Promise.<Boolean, Error>
Stop the application
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Promise.<Boolean, Error>
- A promise resolved to true if application has been stopped
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the application to stop |
options | Map | Additional options |
getInformation(application, options) ⇒ Promise.<Object, Error>
Return the application information
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Promise.<Object, Error>
- A promise resolved with application information
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the application to get information |
options | Map | Additional options |
reset(application, options) ⇒ Promise.<Boolean, Error>
Reset the application
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Promise.<Boolean, Error>
- A promise resolved to true if application has been resetted
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the application to reset |
options | Map | Additional options |
getApplicationByChannelId(channelId, options) ⇒ Promise.<Application, Error>
Get application for channelId
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Promise.<Application, Error>
- A promise resolved with application if channel has an application
Param | Type | Description |
---|---|---|
channelId | String | The channel id |
options | Map | Additional options |
_init() ⇒ Promise.<Array, Error>
Init the service (listen events…)
Kind: instance method of AbstractThirdPartyApplicationService
Returns: Promise.<Array, Error>
- A promise resolved to a list of Applications
_getApplicationList(options) ⇒ Promise.<Array, Error>
Vendor implementation to get the application list
Kind: instance abstract method of AbstractThirdPartyApplicationService
Returns: Promise.<Array, Error>
- A promise resolved to a list of Applications
Param | Type | Description |
---|---|---|
options | Map | Additional options |
_start(application, options) ⇒ Promise.<Boolean, Error>
Vendor implementation to start an application
Kind: instance abstract method of AbstractThirdPartyApplicationService
Returns: Promise.<Boolean, Error>
- A promise resolved to true if application has been started
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the application to start |
options | Map | Additional options |
_stop(application, options) ⇒ Promise.<Boolean, Error>
Vendor implementation to stop an application
Kind: instance abstract method of AbstractThirdPartyApplicationService
Returns: Promise.<Boolean, Error>
- A promise resolved to true if application has been stopped
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the application to start |
options | Map | Additional options |
_getInformation(application, options) ⇒ Promise.<Object, Error>
Vendor implementation to get application information
Kind: instance abstract method of AbstractThirdPartyApplicationService
Returns: Promise.<Object, Error>
- A promise resolved with application information
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the application |
options | Map | Additional options |
_reset(application, options) ⇒ Promise.<Boolean, Error>
Vendor implementation to reset an application
Kind: instance abstract method of AbstractThirdPartyApplicationService
Returns: Promise.<Boolean, Error>
- A promise resolved to true if application has been resetted
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the application to reset |
options | Map | Additional options |
_getApplicationByChannelId(channelId, options) ⇒ Promise.<Application, Error>
Vendor implementation to get application by channel id
Kind: instance abstract method of AbstractThirdPartyApplicationService
Returns: Promise.<Application, Error>
- A promise resolved with application if channel has an application
Param | Type | Description |
---|---|---|
channelId | String | the channel id |
options | Map | Additional options |
_onStart(application) ⇒ Promise
Kind: instance method of AbstractThirdPartyApplicationService
Emits: applicationStart
Access: protected
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the started application |
_onStop(application, options) ⇒ Promise
Kind: instance method of AbstractThirdPartyApplicationService
Emits: applicationStop
Access: protected
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the stopped application |
options | Object | the options |
_onReset(application) ⇒ Promise
Kind: instance method of AbstractThirdPartyApplicationService
Emits: applicationReset
Access: protected
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | the resetted application |
_onError(application, error) ⇒ Promise
Kind: instance method of AbstractThirdPartyApplicationService
Emits: applicationError
Access: protected
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | The application which throws an error |
error | Object | the error |
“applicationStart” (application)
Fired when the application has been started
Kind: event emitted by AbstractThirdPartyApplicationService
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | The started application |
“applicationError” (application, error)
Fired when the application throw an error
Kind: event emitted by AbstractThirdPartyApplicationService
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | The application who throw an error |
error | Object | the error |
“applicationReset” (application)
Fired when the application has been resetted
Kind: event emitted by AbstractThirdPartyApplicationService
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | The resetted application |
“applicationStop” (application)
Fired when the application has been stopped
Kind: event emitted by AbstractThirdPartyApplicationService
Param | Type | Description |
---|---|---|
application | AbstractThirdPartyApplication | The stopped application |
“applicationLaunch”
Event that allows the UI to launch a third app
Kind: event emitted by AbstractThirdPartyApplicationService