Constructor that creates a ready to use FeathersCoordinator instance.
The URL of the broker that the FeathersCoordinator should connect to.
The URL of that exposes information about the local device (e.g., the Device UUID).
The Client Id used that identifies the application using this FeathersCoordinator instance
The authentication credentials used to identify the user and that authorize the access to their data.
A function that receives the name of the event and that is called when the connection to the broker is authenticated. A function that simply logs the event is provided by default.
A function that receives the name of the event and that is called when the user logs out from the broker. A function that simply logs the event is provided by default.
A function that receives the name of the event and that is called when there is an erro reauthenticating the user. A function that simply logs the event is provided by default.
The path where to save the local storage data when running the FeathersCoordinator on Node.js.
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.
The Object representing the currenrtly logged in User. Details will only be populated once a connection is established and the user is authenticated.
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.
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.
A Promise that once resolved contains the updated Instance.
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.
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.
A Promise that once resolved contains an array of updated Instance instances.
Emits an event with a given value and a certain name.
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).
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.
Sets the distribution of components, and whether it was automatically or manually distributed, for the Instance with the given Id.
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).
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.
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.
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.
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.
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.
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
Concrete implementation of the Coordinator interface that connects to the YanuX Broker using the Feathers Socket.io Client.