AppHeartBeat

Provides APIs for the app heartbeat management.

By default, the app health monitoring is always enabled. The DAPI when initialized start sending heartbeat to the app manager at every 20 seconds. If the app manager does not receive a heartbeat for 45 seconds then it force reloads the app assuming it is not responding. The app needs to do nothing except initialising DAPI via init call for the health management of the app.

In case the app needs to customize where and when the heartbeat is sent then use AppHeartBeat APIs.

To disable disable the app heartbeat check completely, turn on the developer mode by setting Dvms.DeveloperMode.Enabled = true configuration.

Member Summary

Public Members

Enable/disable auto sending heartbeat from dapi, enabled by default.

Method Summary

Public Methods

send()

Sends heartbeat to the app manager.

Public Members

public autoSend: boolean source

Enable/disable auto sending heartbeat from dapi, enabled by default. To disable automatic heartbeat sending call dapi.appHeartBeat.autoSend = false; After disabling the auto send the app must call send() to send the heartbeat periodically.

Example:

if (dapi.appHeartBeat.autoSend) {
   dapi.appHeartBeat.autoSend = false;
}

Public Methods

public send() source

Sends heartbeat to the app manager. The app needs to call this API if the autoSend is disabled. The app should send heartbeat every 20 seconds.

Example:

dapi.appHeartBeat.send(); // send the heartbeat