Class: TimeObserver

Help4.observer.TimeObserver()

observes time events

Constructor

new TimeObserver()

Source:

Extends

Methods

(protected) ____defineStaticProperties()

auto define all to be cleaned properties
Inherited From:
Source:
Throws:
Error

(protected) ____getClassConfig() → {Help4.jscore.Base.Params}

Inherited From:
Source:
Returns:
Type
Help4.jscore.Base.Params

(protected) ____mergeDerivedParam(level0, type, value)

Parameters:
Name Type Description
level0 Help4.jscore.Base.Params
type string
value *
Inherited From:
Source:
Throws:
Error

(protected) ____mergeDerivedParams(level0, level1)

Parameters:
Name Type Description
level0 Help4.jscore.Base.Params
level1 Help4.jscore.Base.Params
Inherited From:
Source:
Throws:
Error

(protected) ____resolveDerivedParams(classConfig)

Parameters:
Name Type Description
classConfig Help4.jscore.Base.Params
Inherited From:
Source:

(protected) _destroyControl(…keys)

destroys class properties
Parameters:
Name Type Attributes Description
keys string <repeatable>
Inherited From:
Source:

(protected) _fireEvent(event) → {Help4.jscore.Base}

fires an event that can be observed from outside
Parameters:
Name Type Description
event Object the event to be fired
Inherited From:
Source:
Returns:
Type
Help4.jscore.Base

(async, protected) _fireEvent2(event) → {Promise.<Array.<Help4.EmbeddedEvent.EventResponse>>}

fires an event that can be observed from outside
Parameters:
Name Type Description
event Object the event to be fired
Inherited From:
Source:
Returns:
Type
Promise.<Array.<Help4.EmbeddedEvent.EventResponse>>

(protected) _fireEventSync(event) → {Array.<Help4.EmbeddedEvent.EventResponse>}

fires an event that can be observed from outside
Parameters:
Name Type Description
event Object the event to be fired
Inherited From:
Source:
Returns:
Type
Array.<Help4.EmbeddedEvent.EventResponse>

addListener(eventType, listener) → {Help4.jscore.Base}

add an event listener
Parameters:
Name Type Description
eventType string | Array.<string> event type to be observed
listener Help4.EmbeddedEvent.Listener the callback function
Inherited From:
Source:
Returns:
Type
Help4.jscore.Base

addListenerSync(eventType, listener) → {Help4.jscore.Base}

add an event listener
Parameters:
Name Type Description
eventType string | Array.<string> event type to be observed
listener Help4.EmbeddedEvent.Listener the callback function
Inherited From:
Source:
Returns:
Type
Help4.jscore.Base

count() → {number}

returns the number of active connections
Inherited From:
Source:
Returns:
Type
number

destroy()

destroys the observer
Inherited From:
Source:

disconnect() → {Help4.observer.TimeObserver}

stops all observations
Overrides:
Source:
Returns:
Type
Help4.observer.TimeObserver

isDestroyed() → {boolean}

whether instance is destroyed
Inherited From:
Source:
Returns:
Type
boolean

observe(target, options) → {Help4.observer.TimeObserver}

Starts a timeout or an interval; delivers data on time
Parameters:
Name Type Description
target Help4.observer.TimeObserver.Type
options Help4.observer.TimeObserver.Options
Overrides:
Source:
Returns:
Type
Help4.observer.TimeObserver

removeListener(eventType, listener) → {Help4.jscore.Base}

remove an event listener
Parameters:
Name Type Description
eventType string | Array.<string>
listener Help4.EmbeddedEvent.Listener
Inherited From:
Source:
Returns:
Type
Help4.jscore.Base

Type Definitions

Options

the options for TimeObserver.observe
Type:
  • Object
Properties:
Name Type Attributes Description
time number the time to wait
data Object <optional>
the information to be delivered after time
Source:

Type

the types for TimeObserver.observe
Type:
  • 'timeout' | 'interval'
Source: