joynr.system.DiscoveryProvider.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libjoynr-js Show documentation
Show all versions of libjoynr-js Show documentation
JOYnr JavaScript libjoynr-js
/*
* PLEASE NOTE. THIS IS A GENERATED FILE!
* Generation date: Thu Jul 06 08:39:56 CEST 2017
*/
(function(undefined){
var checkImpl = function() {
var missingInImplementation = [];
if (! this.add.checkOperation()) missingInImplementation.push("Operation:add");
if (! this.lookup.checkOperation()) missingInImplementation.push("Operation:lookup");
if (! this.remove.checkOperation()) missingInImplementation.push("Operation:remove");
return missingInImplementation;
};
/**
* @name DiscoveryProvider
* @constructor
*
* @classdesc
* PLEASE NOTE. THIS IS A GENERATED FILE!
*
Generation date: Thu Jul 06 08:39:56 CEST 2017
*
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
).
*
* @summary Constructor of DiscoveryProvider object
*
* @param {Object} [implementation] the implementation of the provider
* @param {Object} [implementation.ATTRIBUTENAME] the definition of attribute implementation
* @param {Function} [implementation.ATTRIBUTENAME.set] the getter function with the
* signature "function(value){}" that stores the given attribute value
* @param {Function} [implementation.ATTRIBUTENAME.get] the getter function with the
* signature "function(){}" that returns the current attribute value
* @param {Function} [implementation.OPERATIONNAME] the operation function
* @param {Object} [implementation.EVENTNAME] the definition of the event implementation
*
* @returns {DiscoveryProvider} a DiscoveryProvider object to communicate with the joynr infrastructure
*/
var DiscoveryProvider = null;
DiscoveryProvider = function DiscoveryProvider(
passedImplementation,
dependencies
) {
if (!(this instanceof DiscoveryProvider)) {
// in case someone calls constructor without new keyword (e.g. var c = Constructor({..}))
return new DiscoveryProvider(
passedImplementation,
dependencies);
}
var implementation = passedImplementation || {};
// defining provider members
/**
* @function DiscoveryProvider#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 dependencies.ProviderOperation(this, implementation.add, "add", [
{
inputParameter: [
{
name : "discoveryEntry",
type : "joynr.types.DiscoveryEntry",
javascriptType : "joynr.types.DiscoveryEntry"
}
],
error: {
type: "no error enumeration given"
},
outputParameter: [
]
}
]);
/**
* @function DiscoveryProvider#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 {DiscoveryProvider#LookupReturned}
* {Array.} result
*/
/**
* @typedef {Object} DiscoveryProvider#LookupReturned
* @property {Array.} result
* a list of matching providers
*/
/**
* @function DiscoveryProvider#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 {DiscoveryProvider#LookupReturned}
* {DiscoveryEntryWithMetaInfo} result
*/
/**
* @typedef {Object} DiscoveryProvider#LookupReturned
* @property {DiscoveryEntryWithMetaInfo} result
* the provider matching the participant ID
*/
this.lookup = new dependencies.ProviderOperation(this, implementation.lookup, "lookup", [
{
inputParameter: [
{
name : "domains",
type : "String[]",
javascriptType : "Array"
},
{
name : "interfaceName",
type : "String",
javascriptType : "string"
},
{
name : "discoveryQos",
type : "joynr.types.DiscoveryQos",
javascriptType : "joynr.types.DiscoveryQos"
}
],
error: {
type: "no error enumeration given"
},
outputParameter: [
{
name : "result",
type : "joynr.types.DiscoveryEntryWithMetaInfo[]",
javascriptType : "Array"
}
]
},
{
inputParameter: [
{
name : "participantId",
type : "String",
javascriptType : "string"
}
],
error: {
type: "no error enumeration given"
},
outputParameter: [
{
name : "result",
type : "joynr.types.DiscoveryEntryWithMetaInfo",
javascriptType : "joynr.types.DiscoveryEntryWithMetaInfo"
}
]
}
]);
/**
* @function DiscoveryProvider#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 dependencies.ProviderOperation(this, implementation.remove, "remove", [
{
inputParameter: [
{
name : "participantId",
type : "String",
javascriptType : "string"
}
],
error: {
type: "no error enumeration given"
},
outputParameter: [
]
}
]);
Object.defineProperty(this, 'checkImplementation', {
enumerable: false,
configurable: false,
writable: false,
value: checkImpl
});
this.interfaceName = "system/Discovery";
return Object.freeze(this);
};
/**
* @name DiscoveryProvider#MAJOR_VERSION
* @constant {Number}
* @default 0
* @summary The MAJOR_VERSION of the provider is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(DiscoveryProvider, 'MAJOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 0
});
/**
* @name DiscoveryProvider#MINOR_VERSION
* @constant {Number}
* @default 1
* @summary The MINOR_VERSION of the provider is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(DiscoveryProvider, 'MINOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 1
});
// AMD support
if (typeof define === 'function' && define.amd) {
define("joynr/system/DiscoveryProvider", [
"joynr/types/DiscoveryEntry",
"joynr/types/DiscoveryScope",
"joynr/types/ProviderQos",
"joynr/types/DiscoveryQos",
"joynr/types/DiscoveryEntryWithMetaInfo",
"joynr/types/Version",
"joynr/types/ProviderScope",
"joynr/types/CustomParameter"
], function () {
return DiscoveryProvider;
}
);
} else if (typeof exports !== 'undefined' ) {
if ((module !== undefined) && module.exports) {
require("../../joynr/types/DiscoveryEntry");
require("../../joynr/types/DiscoveryScope");
require("../../joynr/types/ProviderQos");
require("../../joynr/types/DiscoveryQos");
require("../../joynr/types/DiscoveryEntryWithMetaInfo");
require("../../joynr/types/Version");
require("../../joynr/types/ProviderScope");
require("../../joynr/types/CustomParameter");
exports = module.exports = DiscoveryProvider;
}
else {
// support CommonJS module 1.1.1 spec (`exports` cannot be a function)
exports.DiscoveryProvider = DiscoveryProvider;
}
} else {
window.DiscoveryProvider = DiscoveryProvider;
}
})();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy