Home Reference Source Test
public class | source

DataObjectReporter

Extends:

DataObject → DataObjectReporter

The class returned from the Syncher create call. To be used as a reporter point, changes will be submited to DataObjectObserver instances.

Member Summary

Public Members
public get

subscriptions: Object<HypertyURL, SyncSubscription>

Subscriptions requested and accepted to this reporter

Method Summary

Public Methods
public

delete()

Release and delete object data

public

inviteObservers(observers: HypertyURL[])

Send invitations (create messages) to hyperties, observers list.

public

onRead(callback: function(event: MsgEvent))

Setup the callback to process read notifications

public

onResponse(callback: function(event: MsgEvent))

Setup the callback to process response notifications of the create's

public

onSubscription(callback: function(event: MsgEvent))

Setup the callback to process subscribe and unsubscribe notifications

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 Members

public get subscriptions: Object<HypertyURL, SyncSubscription> source

Subscriptions requested and accepted to this reporter

Public Methods

public delete() source

Release and delete object data

public inviteObservers(observers: HypertyURL[]) source

Send invitations (create messages) to hyperties, observers list.

Params:

NameTypeAttributeDescription
observers HypertyURL[]

List of Hyperty URL's

public onRead(callback: function(event: MsgEvent)) source

Setup the callback to process read notifications

Params:

NameTypeAttributeDescription
callback function(event: MsgEvent)

public onResponse(callback: function(event: MsgEvent)) source

Setup the callback to process response notifications of the create's

Params:

NameTypeAttributeDescription
callback function(event: MsgEvent)

function to receive events

public onSubscription(callback: function(event: MsgEvent)) source

Setup the callback to process subscribe and unsubscribe notifications

Params:

NameTypeAttributeDescription
callback function(event: MsgEvent)

function to receive events