Reference Source
public class | source

Service

Constructor Summary

Public Constructor
public

constructor(arg_svc_name: string, arg_svc_settings: object): nothing

Create a service wrapper instance.

Member Summary

Public Members
public

$name: *

public

$ops: *

public
public
public

timers: {}

Method Summary

Public Methods
public

create_poller(arg_poller_settings: object, arg_op_name: object, arg_credentials: object, arg_socket: object, arg_op_opds: array): nothing

Create a poller for the given socket operation.

public

create_timeline(op_name: *, svc_socket: *, timeline_settings: *)

public

create_timer(arg_timer_name: string, arg_timer_cb: function, arg_delay: integer, arg_force_create: boolean): nothing

Create a timer.

public

delete_timer(): nothing

Delete a timer.

public

Get service name.

public

load(arg_settings: object): nothing

Load service settings.

Public Constructors

public constructor(arg_svc_name: string, arg_svc_settings: object): nothing source

Create a service wrapper instance.

Params:

NameTypeAttributeDescription
arg_svc_name string

service name.

arg_svc_settings object

service settiings.

Return:

nothing

Public Members

public $name: * source

public $ops: * source

public execute_on_browser: boolean source

public is_service: boolean source

public timers: {} source

Public Methods

public create_poller(arg_poller_settings: object, arg_op_name: object, arg_credentials: object, arg_socket: object, arg_op_opds: array): nothing source

Create a poller for the given socket operation.

Params:

NameTypeAttributeDescription
arg_poller_settings object

poller settings { name:'...', interval_seconds|interval_milliseconds:number }.

arg_op_name object

service operation name.

arg_credentials object

session credentials.

arg_socket object

service socket.

arg_op_opds array

operation operands (optional)(default=[]).

Return:

nothing

public create_timeline(op_name: *, svc_socket: *, timeline_settings: *) source

Params:

NameTypeAttributeDescription
op_name *
svc_socket *
timeline_settings *

public create_timer(arg_timer_name: string, arg_timer_cb: function, arg_delay: integer, arg_force_create: boolean): nothing source

Create a timer.

Params:

NameTypeAttributeDescription
arg_timer_name string

timer unique name.

arg_timer_cb function

timer callback function.

arg_delay integer

timer interval integer in milliseconds.

arg_force_create boolean

if true delete existing timer and recreate it (default=false).

Return:

nothing

public delete_timer(): nothing source

Delete a timer.

Params:

NameTypeAttributeDescription
arg_timer_id. any

Return:

nothing

public get_name(): string source

Get service name.

Return:

string

public load(arg_settings: object): nothing source

Load service settings.

Params:

NameTypeAttributeDescription
arg_settings object

runtime settings.

Return:

nothing