Reference Source
public class | source

BindingStream

Constructor Summary

Public Constructor
public

constructor(arg_id: string, arg_runtime: RuntimeBase, arg_component: Component): nothing

Creates an instance of Binding for stream.

Member Summary

Public Members
public
Private Members
private
private

_id: *

private
private
private
private
private
private
private
private
private

_stream: *

private
private
private
private

Method Summary

Public Methods
public

bind_stream(arg_stream: object, arg_values_xform: string | array | function, arg_bound_object: object, arg_bound_method: string, arg_method_operands: anything, arg_format_object: object, arg_starting_value: any, arg_options: object): function

Bind a stream to a target object action.

public

Build binding.

public

Get a formatting function or identity.

public

set_options(arg_options: *): *

public

set_source_service_method(arg_source_svc_method: *): *

public

set_source_service_name(arg_source_svc_name: *): *

public

set_source_timeline_name(arg_source_timeline: *): *

public

set_source_transformation(arg_transformation: *): *

public

set_starting_value(arg_starting_value: *): *

public

set_state_path(arg_state_path: *): *

public

set_stream(arg_stream: *): *

public

set_target_method_name(arg_target_method: *): *

public

set_targets_instances_array(arg_targets: *): *

Public Constructors

public constructor(arg_id: string, arg_runtime: RuntimeBase, arg_component: Component): nothing source

Creates an instance of Binding for stream.

Params:

NameTypeAttributeDescription
arg_id string

binding identifier.

arg_runtime RuntimeBase

client runtime.

arg_component Component

component instance.

Return:

nothing

Public Members

public is_binding_stream: boolean source

Private Members

private _component: * source

private _id: * source

private _options: * source

private _runtime: * source

private _source_svc_method: * source

private _source_svc_name: * source

private _source_timeline: * source

private _source_xform: * source

private _starting_value: * source

private _state_path: * source

private _stream: * source

private _target_method: * source

private _targets: * source

private _unsubscribe: * source

private _unsubscribe_state_update: * source

Public Methods

public bind_stream(arg_stream: object, arg_values_xform: string | array | function, arg_bound_object: object, arg_bound_method: string, arg_method_operands: anything, arg_format_object: object, arg_starting_value: any, arg_options: object): function source

Bind a stream to a target object action.

Params:

NameTypeAttributeDescription
arg_stream object

stream instance.

arg_values_xform string | array | function

values transformation (optional).

arg_bound_object object

target object instance (optional: this as default).

arg_bound_method string

target object method string.

arg_method_operands anything

target object method operands (optional).

arg_format_object object

formatting settings.

arg_starting_value any

starting value.

arg_options object

binding options.

Return:

function

unsubscribe function.

public build(): Promise source

Build binding.

Return:

Promise

public get_format_value_function(arg_format_object: object): Function source

Get a formatting function or identity. Format settings example: { "type":"number", "digits":2 }

Params:

NameTypeAttributeDescription
arg_format_object object

format settings.

Return:

Function

Formatting function or identity.

public set_options(arg_options: *): * source

Params:

NameTypeAttributeDescription
arg_options *

Return:

*

public set_source_service_method(arg_source_svc_method: *): * source

Params:

NameTypeAttributeDescription
arg_source_svc_method *

Return:

*

public set_source_service_name(arg_source_svc_name: *): * source

Params:

NameTypeAttributeDescription
arg_source_svc_name *

Return:

*

public set_source_timeline_name(arg_source_timeline: *): * source

Params:

NameTypeAttributeDescription
arg_source_timeline *

Return:

*

public set_source_transformation(arg_transformation: *): * source

Params:

NameTypeAttributeDescription
arg_transformation *

Return:

*

public set_starting_value(arg_starting_value: *): * source

Params:

NameTypeAttributeDescription
arg_starting_value *

Return:

*

public set_state_path(arg_state_path: *): * source

Params:

NameTypeAttributeDescription
arg_state_path *

Return:

*

public set_stream(arg_stream: *): * source

Params:

NameTypeAttributeDescription
arg_stream *

Return:

*

public set_target_method_name(arg_target_method: *): * source

Params:

NameTypeAttributeDescription
arg_target_method *

Return:

*

public set_targets_instances_array(arg_targets: *): * source

Params:

NameTypeAttributeDescription
arg_targets *

Return:

*