The Object representing the client application that is connecting to the Broker.
The Object representing the Device where this Coordinator is being run. Details will only be populated once a connection is established and the user is authenticated.
The Object representing the currently running instance of the Coordinator, together with the client application, on the local device. This Object is populated once a connection is established and the user is authenticated. Assuming that Coordinator.subscribeInstances has been called, this Object will be automatically updated every time that the Coordinator has been notified that the currently running local Instance has changed.
The Object representing the current state of the proxemic relationships between the devices found in the surrounding environment and their capabilities. This Object is populated once a connection is established and the user is authenticated. Assuming that Coordinator.subscribeProxemics has been called, this Object will be automatically updated every time that the Coordinator has been notified that the Proxemics of the currently logged in User have changed.
The Object representing the default Resource (Resource.default) of the User which is currently connected and logged in through the Coordinator. Assuming that Coordinator.subscribeResources has been called, this Object will be automatically updated every time that the Coordinator has been notified that the default Resource for the User has changed. It will also be opportunistically updated by Coordinator.getResources and {@link Coordinator.updateResource}, i.e., if any of those methods happen to be dealing with the default resource, they will ensure the Coordinator.resource gets updated.
A string with the Id of the currently subscribed Resource that the Coordinator is currently subscribed to (e.g., the Resource was selected in the User Interface of a client application) This string is set once a connection is established and the user is authenticated. It will also be updated when a user when Coordinator.subscribeResource is called.
The Object representing the currenrtly logged in User. Details will only be populated once a connection is established and the user is authenticated.
This is a helper method that clears the distribution of components by calling Coordinator.setComponentDistribution after received 'reset-auto-components-distribution' event generated by the ComponentsDistributionElement.
An 'updated-components-distribution' event generated by the ComponentsDistributionElement.
A Promise that once resolved contains the updated Instance.
The name of the new resource. If a resource name is not provide an empty string will be used.
A Promise that once resolved constains the newly created resource in the form an instance of SharedResource class. If an error occurs the Promise will be rejected.
Deletes a Resource with the given Id.
The Id of the Resource that should be deleted. If no Id is provided the Id of the currently subscribed to resource will be used (Coordinator.subscribedResourceId).
A Promise that once resolved constains the deleted resource in the form an instance of SharedResource class. If an error occurs the Promise will be rejected.
This is a helper method that distributes components by calling Coordinator.setComponentDistribution based on 'updated-components-distribution' event generated by the ComponentsDistributionElement.
An 'updated-components-distribution' event generated by the ComponentsDistributionElement.
A Promise that once resolved contains an array of updated Instance instances.
Emits an event with a given value and a certain name.
A plain object with the information that is associated with the event.
A string with the name of the event.
A Promise that once resolved contains the created event as it was returned from the broker. If an error occurs the Promise will be rejected.
Gets the active Instances (i.e., Instance.active is true) that the current User has access to (i.e., owned or shared with the user through resource sharing).
A Promise that once resolved contains the active instances as they were returned from the broker. They should however nearly match the structure of the Instance class. If an error occurs the Promise will be rejected.
Gets all the Instances that the current User has access to (i.e., owned or shared with the user through resource sharing).
Extra conditions that can be added to the query to further filter the returned instances.
A Promise that once resolved contains the instances as they were returned from the broker. They should however nearly match the structure of the Instance class. If an error occurs the Promise will be rejected.
Gets the Proxemic state (i.e., the Proxemics.state value) for the current User. The state contains the proxemic information and capabilities of a device, i.e., if a device is present in the environment this object should contain a key with its UUID that points to an object that represents the device capabilities.
A Promise that once resolved constains the Proxemic state (i.e., the Proxemics.state value) for the current User.
Gets all the resources that a user has access to (i.e., owned or shared with) in the form of an array instances of the SharedResource class.
A Promise that once resolved constains the array of SharedResources. If an error occurs the Promise will be rejected.
It initializes the connection to the broker and returns a promise with useful information.
A Promise that once resolved contains an array with the data of default resource (Coordinator.resource), information about the proxemic state and the Id of the default resource.
Checks if the Coordinator is connected to the broker.
A boolean which indicated if the Coordinator is connhected (true) or not (false).
Logs out from the broker.
It implicitly subscribes to the Resource with the given Id and returns the most up-to-date data stored by the resource.
The function that gets called when a change to the subscribed Resource is received. The function receives the resource data (Resource.data) and the type of event (created, updated, patched or removed) that generated the change.
The Id of the Resource that should be subscribed to and have its data content retrieved.
Sets the distribution of components, and whether it was automatically or manually distributed, for the Instance with the given Id.
An object representing the distribution of components where the keys represent the name of the components and the boolean values represent whether the components is shown (true) or not (false).
It indicates if the distribution was automatically distributed (true) or manually set by a user (false). The distribution is assumed to be true by default.
The Id of the Instance for which the distribution of components is being set. The Id of the current instance (Coordinator.instance) is used by default.
A Promise that once resolved contains the updated Instance.
Sets if the current Instance is active (i.e., the application using the Coordinator is actively being used).
It indicates whether the current Instance should be set as active or inactive.
A Promise that once resolved contains the updated instance as it was returned from the broker. It should however nearly match the structure of the Instance class. If an error occurs the Promise will be rejected.
The e-mail address of the user with whom the Resource with the given Id should be shared.
The Id of the Resource that should be shared with the user with the provided e-mail address. If no Id is provided the Id of the currently subscribed to resource will be used (Coordinator.subscribedResourceId).
A function that receives a plain object with the information that is associated with the event and string with the type of the event.
Subscribe to changes made to the instances belonging to the current User, i.e., instances that become active/inactive or that suffer changes to the distribution of UI components.
Subscribe to changes made to the proxemic relationships of the devices of the current User and possibly of other users that share access to the same subscribed resource.
Subscribe to get reinitialization information from the Coordinator whenever the connection to the broker is reestablished after a disconnect.
A function that receives the data of default resource (Coordinator.resource), information about the proxemic state and the Id of the default resource.
Subscribe to a Resource with a given Id by registering a function that is called whenever there are changes made to that Resource by clients connected to the broker. The Coordinator can only be subscribed to a resource. If it subscribes to another Resource, it will automatically call Coordinator.unsubscribeResource.
The function that gets called when a change to the subscribed Resource is received. The function receives the resource data (Resource.data) and the type of event (created, updated, patched or removed) that generated the change.
The function that gets called when the resource that the currently logged in User is subscribed to changes. The function receives the resource subscription data directly from the broker and the type of event (created, updated, patched or removed) that generated the change.
Subscribe to changes to made to Resource that a user has access to (i.e., owned or shared with). TIP: This can be used to know when new resources are added/removed or shared/unshared.
The function that gets called when a change to a Resource that user has access to is received. The function receives the resource data (Resource.data) and the type of event (created, updated, patched or removed) that generated the change.
The e-mail address of the user with whom the Resource with the given Id should be unshared.
The Id of the Resource that should be unshared with the user with the provided e-mail address. If no Id is provided the Id of the currently subscribed to resource will be used (Coordinator.subscribedResourceId).
Unsubscribe from any changes made to the instances belonging to the current User.
Unsubscribe from any changes made to the proxemic state of the current User.
Unsubscribe to reconnection events.
Unsubscribe from any changes made to the currently subscribed to Resource.
Unsubscribe from any changes made to the resource subscription of the current User.
Unsubscribe from any changes made to Resources.
Update the distribution of UI components according to our restrictions by using a ComponentsRuleEngine. A "configureComponents" function should be passed to be called with the newly determined distribution for the current Instance. If you are using ComponentsDistributionElement it can be passed so that it gets automatically updated.
The ComponentsRuleEngine instance to be used to redistribute the UI components.
Function should be passed to be called with the newly determined distribution for the current Instance.
A ComponentsDistributionElement that can get automatically updated with the changes.
If not passed the Id of the Coordinator.instance will automatically be used.
A boolean flag that instructs the ComponentsRuleEngine to ignore the manual distribution set by the user. It is "false" by default.
A Promise that once resolved contains the updated Instance.
Sets if the current Instance is active by automatically determining if the application instance using the Coordinator is actively being used by taking the value of "document.visibilityState" into consideration.
A Promise that once resolved contains the updated instance as it was returned from the broker. It should however nearly match the structure of the Instance class. If an error occurs the Promise will be rejected.
Gets the updated resources from the YanuX Broker that the current user has access to. If a ResourceManagementElement is passed, it gets updated with the most recent resource information.
An array of SharedResource instances that represent the currently available resources that the current user has access to.
Generated using TypeDoc
Coordinator interface that is exposed as an API to be used by third-party developers.