joynr.types.DiscoveryEntry.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 DiscoveryEntry: DOCS GENERATED FROM INTERFACE DESCRIPTION
* Generation date: Fri Nov 20 11:55:21 CET 2015
*/
(function(undefined) {
/**
* @name DiscoveryEntry
* @constructor
*
* @classdesc
* This is the generated struct type DiscoveryEntry: DOCS GENERATED FROM INTERFACE DESCRIPTION
*
Generation date: Fri Nov 20 11:55:21 CET 2015
*
* @param {Object} members - an object containing the individual member elements
* @param {String} members.domain - the domain to register the provider with
* @param {String} members.interfaceName - the name of the provider interface
* @param {String} members.participantId - the participant ID of the provider
* @param {ProviderQos} members.qos - the qos of the provider
* @param {Array.} members.connections - a list of communications middlewares that can be used
* to access the provider
* @returns {DiscoveryEntry} a new instance of a DiscoveryEntry
*/
var DiscoveryEntry = function DiscoveryEntry(members) {
if (!(this instanceof DiscoveryEntry)) {
// in case someone calls constructor without new keyword (e.g. var c = Constructor({..}))
return new DiscoveryEntry(members);
}
/**
* Used for serialization.
* @name DiscoveryEntry#_typeName
* @type String
* @field
* @readonly
*/
Object.defineProperty(this, "_typeName", {
configurable : false,
writable : false,
enumerable : true,
value : "joynr.types.DiscoveryEntry"
});
/**
* the domain to register the provider with
* @name DiscoveryEntry#domain
* @type String
* @field
*/
/**
* the name of the provider interface
* @name DiscoveryEntry#interfaceName
* @type String
* @field
*/
/**
* the participant ID of the provider
* @name DiscoveryEntry#participantId
* @type String
* @field
*/
/**
* the qos of the provider
* @name DiscoveryEntry#qos
* @type ProviderQos
* @field
*/
/**
* a list of communications middlewares that can be used
* to access the provider
* @name DiscoveryEntry#connections
* @type Array.
* @field
*/
Object.defineProperty(this, 'checkMembers', {
enumerable: false,
value: function checkMembers(check) {
check(this.domain, "String", "members.domain");
check(this.interfaceName, "String", "members.interfaceName");
check(this.participantId, "String", "members.participantId");
check(this.qos, "ProviderQos", "members.qos");
check(this.connections, "Array", "members.connections");
}
});
if (members !== undefined) {
this.domain = members.domain;
this.interfaceName = members.interfaceName;
this.participantId = members.participantId;
this.qos = members.qos;
this.connections = members.connections;
}
};
var memberTypes = {
domain: function(TypesEnum) { return TypesEnum.STRING; },
interfaceName: function(TypesEnum) { return TypesEnum.STRING; },
participantId: function(TypesEnum) { return TypesEnum.STRING; },
qos: function(TypesEnum) { return "joynr.types.ProviderQos"; },
connections: function(TypesEnum) { return "joynr.types.CommunicationMiddleware[]"; }
};
Object.defineProperty(DiscoveryEntry, '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/DiscoveryEntry", ["joynr"], function (joynr) {
DiscoveryEntry.prototype = new joynr.JoynrObject();
DiscoveryEntry.prototype.constructor = DiscoveryEntry;
joynr.addType("joynr.types.DiscoveryEntry", DiscoveryEntry);
return DiscoveryEntry;
});
} else if (typeof exports !== 'undefined' ) {
if ((module !== undefined) && module.exports) {
exports = module.exports = DiscoveryEntry;
} else {
// support CommonJS module 1.1.1 spec (`exports` cannot be a function)
exports.DiscoveryEntry = DiscoveryEntry;
}
var joynr = requirejs("joynr");
DiscoveryEntry.prototype = new joynr.JoynrObject();
DiscoveryEntry.prototype.constructor = DiscoveryEntry;
joynr.addType("joynr.types.DiscoveryEntry", DiscoveryEntry);
} else {
DiscoveryEntry.prototype = new window.joynr.JoynrObject();
DiscoveryEntry.prototype.constructor = DiscoveryEntry;
window.joynr.addType("joynr.types.DiscoveryEntry", DiscoveryEntry);
window.DiscoveryEntry = DiscoveryEntry;
}
})();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy