joynr.system.DiscoveryProxy.js Maven / Gradle / Ivy
/**
* PLEASE NOTE: THIS IS A GENERATED FILE!
* Generation date: Thu Aug 18 09:35:50 CEST 2016
*
* DiscoveryProxy, generated from the corresponding interface description.
*/
(function (undefined){
/**
* @name DiscoveryProxy
* @constructor
*
* @classdesc
*
Generation date: Thu Aug 18 09:35:50 CEST 2016
*
* DiscoveryProxy, generated from the corresponding interface description.
*
The Discovery
interface is a joynr internal
* interface. This interface is used by libjoynr to add, lookup or
* remove provider to joynr discovery. Internally joynr discovery
* consists of a centralized discovery directory
* (GlobalCapabilitiesDirectory
) that is distributed to
* all cluster controller (LocalCapabilitiesDirectory
).
*
* @param {object} settings the settings object for this function call
* @param {String} settings.domain the domain name //TODO: check do we need this?
* @param {String} settings.joynrName the interface name //TODO: check do we need this?
*
* @param {Object} settings.discoveryQos the Quality of Service parameters for arbitration
* @param {Number} settings.discoveryQos.discoveryTimeoutMs for rpc calls to wait for arbitration to finish.
* @param {String} settings.discoveryQos.arbitrationStrategy Strategy for choosing the appropriate provider from the list returned by the capabilities directory
* @param {Number} settings.discoveryQos.cacheMaxAgeMs Maximum age of entries in the localCapabilitiesDirectory. If this value filters out all entries of the local capabilities directory a lookup in the global capabilitiesDirectory will take place.
* @param {Boolean} settings.discoveryQos.discoveryScope If localOnly is set to true, only local providers will be considered.
* @param {Object} settings.discoveryQos.additionalParameters a map holding additional parameters in the form of key value pairs in the javascript object, e.g.: {"myKey": "myValue", "myKey2": 5}
*
* @param {object} settings.messagingQos the Quality of Service parameters for messaging
* @param {Number} settings.messagingQos.ttl Roundtrip timeout for rpc requests.
* @param {Number} settings.dependencies instances of the internal objects needed by the proxy to interface with joynr
* @param {Number} settings.proxyElementTypes constructors for attribute, method and broadcasts, used to create the proxy's elements
*
* @returns {DiscoveryProxy} a DiscoveryProxy object to access other providers
*/
var DiscoveryProxy = function DiscoveryProxy(
settings) {
if (!(this instanceof DiscoveryProxy)) {
// in case someone calls constructor without new keyword (e.g. var c = Constructor({..}))
return new DiscoveryProxy(
settings);
}
// generated package name
this.settings = settings || {};
/**
* @function DiscoveryProxy#add
* @summary The add operation is GENERATED FROM THE INTERFACE DESCRIPTION
*
Adds a provider to the joynr discovery.
*
* @param {Object} settings the arguments object for this function call
* @param {DiscoveryEntry} settings.discoveryEntry -
* the new DiscoveryEntry to be added
*/
this.add = new settings.proxyElementTypes.ProxyOperation(this, settings, "add", [
{
inputParameter: [
{
name : "discoveryEntry",
type : "joynr.types.DiscoveryEntry"
}
],
outputParameter: [
],
fireAndForget: false
}
]).buildFunction();
/**
* @function DiscoveryProxy#lookup
* @summary The lookup operation is GENERATED FROM THE INTERFACE DESCRIPTION
*
method overloading: different call semantics possible
*
Looks up a providers in the joynr discovery that match
* the requested QoS.
*
* @param {Object} settings the arguments object for this function call
* @param {Array.} settings.domains -
* the domain to search for provider
* @param {String} settings.interfaceName -
* the interface the provider must implement
* @param {DiscoveryQos} settings.discoveryQos -
* the QoS used for the lookup
* @returns {DiscoveryProxy#LookupReturned}
* {Array.} result
*/
/**
* @typedef {Object} DiscoveryProxy#LookupReturned
* @property {Array.} result
* a list of matching providers
*/
/**
* @function DiscoveryProxy#lookup
* @summary The lookup operation is GENERATED FROM THE INTERFACE DESCRIPTION
*
method overloading: different call semantics possible
*
Looks up a specific provider in the joynr discovery.
*
* @param {Object} settings the arguments object for this function call
* @param {String} settings.participantId -
* the participant ID of the provider to look up
* @returns {DiscoveryProxy#LookupReturned}
* {DiscoveryEntry} result
*/
/**
* @typedef {Object} DiscoveryProxy#LookupReturned
* @property {DiscoveryEntry} result
* the provider matching the participant ID
*/
this.lookup = new settings.proxyElementTypes.ProxyOperation(this, settings, "lookup", [
{
inputParameter: [
{
name : "domains",
type : "String[]"
},
{
name : "interfaceName",
type : "String"
},
{
name : "discoveryQos",
type : "joynr.types.DiscoveryQos"
}
],
outputParameter: [
{
name : "result",
type : "joynr.types.DiscoveryEntry[]"
}
],
fireAndForget: false
}, {
inputParameter: [
{
name : "participantId",
type : "String"
}
],
outputParameter: [
{
name : "result",
type : "joynr.types.DiscoveryEntry"
}
],
fireAndForget: false
}
]).buildFunction();
/**
* @function DiscoveryProxy#remove
* @summary The remove operation is GENERATED FROM THE INTERFACE DESCRIPTION
*
Removes a provider from joynr discovery.
*
* @param {Object} settings the arguments object for this function call
* @param {String} settings.participantId -
* the participant ID of the provider to remove
*/
this.remove = new settings.proxyElementTypes.ProxyOperation(this, settings, "remove", [
{
inputParameter: [
{
name : "participantId",
type : "String"
}
],
outputParameter: [
],
fireAndForget: false
}
]).buildFunction();
Object.defineProperty(this, "interfaceName", {
writable: false,
readable: true,
value: "system/Discovery"
});
};
/**
* @name DiscoveryProxy#MAJOR_VERSION
* @constant {Number}
* @default 0
* @summary The MAJOR_VERSION of the proxy is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(DiscoveryProxy, 'MAJOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 0
});
/**
* @name DiscoveryProxy#MINOR_VERSION
* @constant {Number}
* @default 1
* @summary The MINOR_VERSION of the proxy is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(DiscoveryProxy, 'MINOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 1
});
DiscoveryProxy.getUsedDatatypes = function getUsedDatatypes(){
return [
"joynr.types.DiscoveryEntry",
"joynr.types.DiscoveryQos"
];
};
// AMD support
if (typeof define === 'function' && define.amd) {
define("joynr/system/DiscoveryProxy", [
"joynr/types/ProviderQos",
"joynr/types/DiscoveryEntry",
"joynr/types/ProviderScope",
"joynr/types/DiscoveryScope",
"joynr/types/Version",
"joynr/types/DiscoveryQos",
"joynr/types/CustomParameter"
], function () {
return DiscoveryProxy;
});
} else if (typeof exports !== 'undefined' ) {
if ((module !== undefined) && module.exports) {
require("../../joynr/types/ProviderQos");
require("../../joynr/types/DiscoveryEntry");
require("../../joynr/types/ProviderScope");
require("../../joynr/types/DiscoveryScope");
require("../../joynr/types/Version");
require("../../joynr/types/DiscoveryQos");
require("../../joynr/types/CustomParameter");
exports = module.exports = DiscoveryProxy;
}
else {
// support CommonJS module 1.1.1 spec (`exports` cannot be a function)
exports.DiscoveryProxy = DiscoveryProxy;
}
} else {
window.DiscoveryProxy = DiscoveryProxy;
}
})();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy