import DataObjectReporter from 'service-framework/src/syncher/DataObjectReporter.js'
DataObjectReporter
Extends:
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 |
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 |
childrens: Object<ChildId, DataObjectChild> 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 Methods
public inviteObservers(observers: HypertyURL[]) source
Send invitations (create messages) to hyperties, observers list.
Params:
Name | Type | Attribute | Description |
observers | HypertyURL[] | List of Hyperty URL's |
public onRead(callback: function(event: MsgEvent)) source
Setup the callback to process read notifications
Params:
Name | Type | Attribute | Description |
callback | function(event: MsgEvent) |