Home Reference Source Test
public class | source

DataObjectObserver

Extends:

DataObject → DataObjectObserver

The class returned from the Syncher subscribe call. To be used as an observation point from a DataObjectReporter change.

Method Summary

Public Methods
public

delete()

Release and delete object data

public

onChange(filter: string, callback: function(event: MsgEvent))

Register the change listeners sent by the reporter

public

Release and delete object data

Inherited Summary

From class DataObject
public get

All created children's since the subscription, doesn't contain all children's since reporter creation.

public get

Data structure to be synchronized.

public get

All Metadata about the Data Object

public get

schema: SchemaURL

Object schema URL (this field is not yet stable, and is subsject to change)

public get

status: Status

Status of the reporter or observer connection (this field is not yet stable, and is subsject to change)

public get

url: ObjectURL

Object URL of reporter or observer

public

addChild(children: String, initialData: JSON, identity: MessageBodyIdentity, input: SyncChildMetadata): Promise<DataObjectChild>

Create and add a DataObjectChild to a children collection.

public

onAddChild(callback: function(event: MsgEvent))

Setup the callback to process create and delete of childrens.

public

resumeChildrens(childrens: *)

Public Methods

public delete() source

Release and delete object data

public onChange(filter: string, callback: function(event: MsgEvent)) source

Register the change listeners sent by the reporter

Params:

NameTypeAttributeDescription
filter string

Filter that identifies the field (separated dot path). Accepts * at the end for a more unrestricted filtering.

callback function(event: MsgEvent)

public unsubscribe() source

Release and delete object data