dispatcher.connectivityManager.NopeConnectivityManager - ZeMA-gGmbH/NoPE-JS GitHub Wiki

Class: NopeConnectivityManager

dispatcher.connectivityManager.NopeConnectivityManager

A Modul to manage the status of other statusmanagers. Dispatcher should have a status manager, to ensure, the system is online etc. Its a base implemetation of the INopeConnectivityManager. Please checkout the interface for more details or the corresponding jupyter notebook.

Author

M.Karkowski

Export

Implements

Implements

Constructors

constructor

new NopeConnectivityManager(options, _generateObservable, id?)

Creates an instance of NopeConnectivityManager.

Author

M.Karkowski

Memberof

NopeConnectivityManager

Parameters

Name Type Default value Description
options INopeINopeConnectivityOptions undefined The Options, used by the Manager.
_generateObservable <T>() => INopeObservable<T, T, T, IEventAdditionalData> undefined A Helper, to generate Observables.
id? string null specific id. Otherwise a ID is generated

Properties

dispatchers

Readonly dispatchers: IMapBasedMergeData<string, INopeStatusInfo, string, string>

Mapping for the External Dispatchers. You can use the Event, onChange, to get the latest changes. Use the "data" field, to subscribe for the latest data.

OriginalKey = Dispatcher ID; OriginalValue = INopeStatusInfo; ExtractedKey = Dispatcher ID; ExtractedValue = Dispatcher ID;

Author

M.Karkowski

Memberof

INopeStatusManager

Implementation of

INopeConnectivityManager.dispatchers


id

Readonly id: string = null

specific id. Otherwise a ID is generated

Implementation of

INopeConnectivityManager.id


options

options: INopeINopeConnectivityOptions

The Options, used by the Manager.

Implementation of

INopeConnectivityManager.options


ready

Readonly ready: INopeObservable<boolean, boolean, boolean, IEventAdditionalData>

Flag, to show, that the System is ready

Author

M.Karkowski

Memberof

INopeStatusManager

Implementation of

INopeConnectivityManager.ready

Accessors

connectedSince

get connectedSince(): number

see connectedSince

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

number

Implementation of

INopeConnectivityManager.connectedSince


info

get info(): INopeStatusInfo

see info

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

INopeStatusInfo

Implementation of

INopeConnectivityManager.info


isMaster

get isMaster(): boolean

see isMaster

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

boolean

Implementation of

INopeConnectivityManager.isMaster

set isMaster(value): void

see isMaster

Author

M.Karkowski

Memberof

NopeConnectivityManager

Parameters

Name Type
value boolean

Returns

void

Implementation of

INopeConnectivityManager.isMaster


master

get master(): INopeStatusInfo

see master

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

INopeStatusInfo

Implementation of

INopeConnectivityManager.master


now

get now(): number

see now

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

number

Implementation of

INopeConnectivityManager.now


upTime

get upTime(): number

see upTime

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

number

Implementation of

INopeConnectivityManager.upTime

Methods

dispose

dispose(quiet?): Promise<void>

Will dispose the Dispatcher. Must be called on exit for a clean exit. Otherwise it is defined as dirty exits

Parameters

Name Type Default value
quiet boolean false

Returns

Promise<void>

Implementation of

INopeConnectivityManager.dispose


emitBonjour

emitBonjour(): Promise<void>

see emitBonjour

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

Promise<void>

Implementation of

INopeConnectivityManager.emitBonjour


getAllHosts

getAllHosts(): string[]

see getAllHosts

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

string[]

{string[]}

Implementation of

INopeConnectivityManager.getAllHosts


getStatus

getStatus(id): INopeStatusInfo

see getStatus

Author

M.Karkowski

Memberof

NopeConnectivityManager

Parameters

Name Type
id string

Returns

INopeStatusInfo

Implementation of

INopeConnectivityManager.getStatus


reset

reset(): void

see reset

Author

M.Karkowski

Memberof

NopeConnectivityManager

Returns

void

Implementation of

INopeConnectivityManager.reset


setTimings

setTimings(options): void

see setTimings

Author

M.Karkowski

Memberof

NopeConnectivityManager

Parameters

Name Type
options Partial<INopeINopeConnectivityTimeOptions>

Returns

void

Implementation of

INopeConnectivityManager.setTimings


syncTime

syncTime(timestamp, delay?): void

see syncTime

Author

M.Karkowski

Memberof

NopeConnectivityManager

Parameters

Name Type Default value
timestamp number undefined
delay? number 0

Returns

void

Implementation of

INopeConnectivityManager.syncTime


toDescription

toDescription(): Object

Describes the Data.

Returns

Object

Name Type
dispatchers string[]

Implementation of

INopeConnectivityManager.toDescription

⚠️ **GitHub.com Fallback** ⚠️