joynr.types.DiscoveryQos.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
/**
* This is the generated struct type DiscoveryQos: DOCS GENERATED FROM INTERFACE DESCRIPTION
* Generation date: Fri Nov 20 11:55:21 CET 2015
*/
(function(undefined) {
/**
* @name DiscoveryQos
* @constructor
*
* @classdesc
* This is the generated struct type DiscoveryQos: DOCS GENERATED FROM INTERFACE DESCRIPTION
*
Generation date: Fri Nov 20 11:55:21 CET 2015
*
Discovery quality of service settings
*
* @param {Object} members - an object containing the individual member elements
* @param {Number} members.cacheMaxAge - The maximum age of a cached entry in milliseconds
* @param {DiscoveryScope} members.discoveryScope - The discovery scope
* @param {Boolean} members.providerMustSupportOnChange - True, if the provider is required to support the OnChange publication
* @returns {DiscoveryQos} a new instance of a DiscoveryQos
*/
var DiscoveryQos = function DiscoveryQos(members) {
if (!(this instanceof DiscoveryQos)) {
// in case someone calls constructor without new keyword (e.g. var c = Constructor({..}))
return new DiscoveryQos(members);
}
/**
* Used for serialization.
* @name DiscoveryQos#_typeName
* @type String
* @field
* @readonly
*/
Object.defineProperty(this, "_typeName", {
configurable : false,
writable : false,
enumerable : true,
value : "joynr.types.DiscoveryQos"
});
/**
* The maximum age of a cached entry in milliseconds
* @name DiscoveryQos#cacheMaxAge
* @type Number
* @field
*/
/**
* The discovery scope
* @name DiscoveryQos#discoveryScope
* @type DiscoveryScope
* @field
*/
/**
* True, if the provider is required to support the OnChange publication
* @name DiscoveryQos#providerMustSupportOnChange
* @type Boolean
* @field
*/
Object.defineProperty(this, 'checkMembers', {
enumerable: false,
value: function checkMembers(check) {
check(this.cacheMaxAge, "Number", "members.cacheMaxAge");
check(this.discoveryScope, ["String", "Object", "DiscoveryScope"], "members.discoveryScope");
check(this.providerMustSupportOnChange, "Boolean", "members.providerMustSupportOnChange");
}
});
if (members !== undefined) {
this.cacheMaxAge = members.cacheMaxAge;
this.discoveryScope = members.discoveryScope;
this.providerMustSupportOnChange = members.providerMustSupportOnChange;
}
};
var memberTypes = {
cacheMaxAge: function(TypesEnum) { return TypesEnum.LONG; },
discoveryScope: function(TypesEnum) { return "joynr.types.DiscoveryScope"; },
providerMustSupportOnChange: function(TypesEnum) { return TypesEnum.BOOL; }
};
Object.defineProperty(DiscoveryQos, 'getMemberType', {
enumerable: false,
value: function getMemberType(memberName, TypesEnum) {
if (memberTypes[memberName] !== undefined) {
return memberTypes[memberName](TypesEnum);
}
return undefined;
}
});
// AMD support
if (typeof define === 'function' && define.amd) {
define("joynr/types/DiscoveryQos", ["joynr"], function (joynr) {
DiscoveryQos.prototype = new joynr.JoynrObject();
DiscoveryQos.prototype.constructor = DiscoveryQos;
joynr.addType("joynr.types.DiscoveryQos", DiscoveryQos);
return DiscoveryQos;
});
} else if (typeof exports !== 'undefined' ) {
if ((module !== undefined) && module.exports) {
exports = module.exports = DiscoveryQos;
} else {
// support CommonJS module 1.1.1 spec (`exports` cannot be a function)
exports.DiscoveryQos = DiscoveryQos;
}
var joynr = requirejs("joynr");
DiscoveryQos.prototype = new joynr.JoynrObject();
DiscoveryQos.prototype.constructor = DiscoveryQos;
joynr.addType("joynr.types.DiscoveryQos", DiscoveryQos);
} else {
DiscoveryQos.prototype = new window.joynr.JoynrObject();
DiscoveryQos.prototype.constructor = DiscoveryQos;
window.joynr.addType("joynr.types.DiscoveryQos", DiscoveryQos);
window.DiscoveryQos = DiscoveryQos;
}
})();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy