MOffline

MOffline ⇐ Trait

Kind: global class
Extends: Trait
Singleton:
Properties

NameTypeDescription
isOnlineboolean

stores the current status of the component

backoffDelaynumber

base delay used in the backoff algorithm

backoffMaxDelaynumber

maximum delay before we try to check if component is back online.

timerManagerTimerManager
nbRetryNumber

count the number of times we check the component status before it goes online again

_backoffTimerIdTimerManager

stores timer id

enableOfflineModeboolean

enable / disable offline mode

MOffline()

Helper to add online/offline status on some component

checkOnline() ⇒ Promise

Check if component is online.

By default this method does not check if component is really online, it simply return the its current known status. This is because we rely on the automatic online status check behaviour, started as soon as the component becomes “offline”. It could be override to change that behaviour.

Kind: instance method of MOffline

manageOfflineError(error) ⇒ Promise

Manage error in component to check if this error could be caused by the “offline” status of the component.

Kind: instance method of MOffline

ParamTypeDescription
errorError

the error