Adds a new event listener for the specified event. The class will ignore duplicate registrations of the same listener to the same event.
The name of the event to add the listener for.
The listener callback to register.
This object, in support of a fluent API.
Provides the events emitted by this object as an Observable stream.
An Observable stream of all events emitted by this object.
Each node within a RealTimeModel has a system-generated ID that is unique within this model's contents.
a unique (to the model) ID for this element
True if the element is currently set up to synchronize with the server.
True if the element is no longer synchronizing with the server. See the developer guide for more information.
Returns the model to which this element belongs.
Removes a single event listener for a specific event.
The name of the event to remove the listener for.
The listener callback to unregister.
This object, in support of a fluent API.
Adds a new event listener for the specified event. The class will ignore duplicate registrations of the same listener to the same event.
The name of the event to add the listener for.
The listener callback to register.
This object, in support of a fluent API.
Adds a single shot event listener for the specified event. The listener will be called the first time the specified event is fired after the event registration occurs, after which the registration will be removed and no further events will be passed to the listener.
The name of the event to add the listener for.
The listener callback to register.
This object, in support of a fluent API.
Returns the remote ModelReference created by the given sessionId
with
the unique name key
, or undefined
if no such reference exists.
See Remote References in the developer guide.
The session ID that created the reference
the reference's unique key
Returns any remote references that match the given filter. You can provide
a single key
which could return references from multiple users, sessionId
which would return all of a particular user session's references, or both,
which is really just the same as using the reference method.
an object containing either a sessionId
, key
, or both
An array of remote ModelReferences, or an empty array if there were no matches.
Removes all listeners for all events. This is useful for cleanup before disposing of this particular event emitter.
This object, in support of a fluent API.
Removes a single event listener for a specific event.
The name of the event to remove the listener for.
The listener callback to unregister.
This object, in support of a fluent API.
Removes all listeners bound on the given event.
the name of the event to remove listeners for
This object, in support of a fluent API.
Returns a JSON-compatible representation of this element.
This element's type. See [[ModelElementType]] for an enumeration of types.
Returns the current underlying value of this element. Note that the return value will not be kept up to date automatically; rather, this function will need to be called each time the most up-to-date value is required.
Sets the value of this element, whose type must be the underlying type of this object.
On a successful value
call, the appropriate IValueChangedEvent will be emitted
to any remote users. This will be one of:
the new value for this object.
This is a convenience object that represents the absence of a value. These are not actually part of the model, but can be returned in instances where the requested element does not exist.
More information is in the developer guide.