Skip to main content
Access via:io.appManager

Application Management API.

Properties (2)

Property Type Default Required Description
inMemory⚓︎ InMemory x

Object that can be used for handling app definitions dynamically.

myInstance⚓︎ Instance x

The instance of the application.

8 Methods

application()⚓︎

(name: string) => Application

Returns an application by name.

Parameters (1)

Name Type Required Description
name⚓︎ string

Name of the desired application.

Returns

The application.

applications()⚓︎

() => Application[]

Returns a list of all applications.

Returns

A list of all applications.

instances()⚓︎

() => Instance[]

Returns an array with all running application instances.

Returns

A list of all running application instances.

onAppAdded()⚓︎

(callback: (app: Application) => any) => UnsubscribeFunction

Notifies when an application is registered in the environment. Replays the already added applications.

Parameters (1)

Name Type Required Description
callback⚓︎ (app: Application) => any

Callback function to handle the event. Receives the added application as a parameter.

Returns

Unsubscribe function.

onAppChanged()⚓︎

(callback: (app: Application) => any) => UnsubscribeFunction

Notifies when the configuration for an application has changed.

Parameters (1)

Name Type Required Description
callback⚓︎ (app: Application) => any

Callback function to handle the event. Receives the changed application as a parameter.

Returns

Unsubscribe function.

onAppRemoved()⚓︎

(callback: (app: Application) => any) => UnsubscribeFunction

Notifies when the application is removed from the environment.

Parameters (1)

Name Type Required Description
callback⚓︎ (app: Application) => any

Callback function to handle the event. Receives the removed application as a parameter.

Returns

Unsubscribe function.

onInstanceStarted()⚓︎

(callback: (instance: Instance) => any) => UnsubscribeFunction

Notifies when a new application instance has been started. Replays the already started instances.

Parameters (1)

Name Type Required Description
callback⚓︎ (instance: Instance) => any

Callback function to handle the event. Receives the started application instance as a parameter.

Returns

Unsubscribe function.

onInstanceStopped()⚓︎

(callback: (instance: Instance) => any) => UnsubscribeFunction

Notifies when an application instance has been stopped.

Parameters (1)

Name Type Required Description
callback⚓︎ (instance: Instance) => any

Callback function to handle the event. Receives the stopped application instance as a parameter.

Returns

Unsubscribe function.