Home Manual Reference Source Test
public class | source

Functions

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
Private Members
private
private

_entries: *[]

private

Method Summary

Public Methods
public

addFunction(func: function, context: object, executeInCycle: boolean, priority: number, callback: function, errorCallback: function): void

Add the function to entries if trigger is in progress, adds once its completed

public

Based on return value of predicate, this function decides whether to execute the method in immediate frame cycle or following cycle

public

executeWhenIdle(apiFunc: function, callback: function, errorCallback: function): void

Based on return value of predicate, this function decides whether to execute the method immediately or in frame cycle

public

Should be extended by calling super.functionsDidExecute() by the class which inherits it, If connector is enabled , this will trigger the function that was referenced to connector

public

Should be implemented by the class which inherits it, will be called before executing entries

public

linkConnector(): void

enables the connector function which is the binder for next sequence of actions if trigger is in progress, enables once its completed

public

removeConnector(): void

removes the connector function which is the binder for next sequence of actions if trigger is in progress, removes once its completed

public

removeFunction(func: function, context: object, callback: function): void

remove the function from entries if trigger is in progress, removes once its completed

public

setConnector(connector: function): void

sets the connector function which is the binder for next sequence of actions if trigger is in progress, sets once its completed

public

Should be implemented by the class which inherits it, Should be a predicate function which decides whether to execute the entries.

public

trigger(callback: function): void

execute all the entries

public

unLinkConnector(): void

disables the connector function which is the binder for next sequence of actions if trigger is in progress, disables once its completed

Public Constructors

public constructor() source

Public Members

public connector: * source

public remainingEntries: number source

Private Members

private _enableConnector: boolean source

private _entries: *[] source

private _tickerEntries: *[] source

Public Methods

public addFunction(func: function, context: object, executeInCycle: boolean, priority: number, callback: function, errorCallback: function): void source

Add the function to entries if trigger is in progress, adds once its completed

Params:

NameTypeAttributeDescription
func function
context object
executeInCycle boolean
priority number
callback function
errorCallback function

Return:

void

public executeAsyncWhenIdle(apiFunc: function): object source

Based on return value of predicate, this function decides whether to execute the method in immediate frame cycle or following cycle

Params:

NameTypeAttributeDescription
apiFunc function

Return:

object

notifier

public executeWhenIdle(apiFunc: function, callback: function, errorCallback: function): void source

Based on return value of predicate, this function decides whether to execute the method immediately or in frame cycle

Params:

NameTypeAttributeDescription
apiFunc function
callback function

Api func execution may be sync or Async, if its sync we cant return notifier as user can register doneCallback after API invocation

errorCallback function

Return:

void

public functionsDidExecute() source

Should be extended by calling super.functionsDidExecute() by the class which inherits it, If connector is enabled , this will trigger the function that was referenced to connector

public functionsWillExecute() source

Should be implemented by the class which inherits it, will be called before executing entries

public linkConnector(): void source

enables the connector function which is the binder for next sequence of actions if trigger is in progress, enables once its completed

Return:

void

public removeConnector(): void source

removes the connector function which is the binder for next sequence of actions if trigger is in progress, removes once its completed

Return:

void

public removeFunction(func: function, context: object, callback: function): void source

remove the function from entries if trigger is in progress, removes once its completed

Params:

NameTypeAttributeDescription
func function
context object
callback function

Return:

void

public setConnector(connector: function): void source

sets the connector function which is the binder for next sequence of actions if trigger is in progress, sets once its completed

Params:

NameTypeAttributeDescription
connector function

Return:

void

public shouldExecuteFunctions(): boolean source

Should be implemented by the class which inherits it, Should be a predicate function which decides whether to execute the entries.

Return:

boolean

public trigger(callback: function): void source

execute all the entries

Params:

NameTypeAttributeDescription
callback function

Return:

void

public unLinkConnector(): void source

disables the connector function which is the binder for next sequence of actions if trigger is in progress, disables once its completed

Return:

void