joynr.types.GlobalDiscoveryEntry.js Maven / Gradle / Ivy
/**
* This is the generated struct type GlobalDiscoveryEntry: DOCS GENERATED FROM INTERFACE DESCRIPTION
* Generation date: Thu Aug 18 09:35:51 CEST 2016
*/
(function(undefined) {
/**
* @name GlobalDiscoveryEntry
* @constructor
*
* @classdesc
* This is the generated struct type GlobalDiscoveryEntry: DOCS GENERATED FROM INTERFACE DESCRIPTION
*
Generation date: Thu Aug 18 09:35:51 CEST 2016
*
GlobalDiscoveryEntry stores information about a provider instance and extends
* DiscoveryEntry by adding transport middleware specific address information.
* GlobalDiscoveryEntry objects are used to register a new provider instance with the backend.
* In addition, objects of GlobalDiscoveryEntry will be returned by the backend during the
* arbitration process in order to select a suitable provider for a proxy.
* @see DiscoveryEntry
*
* @param {Object} members - an object containing the individual member elements
* @param {Version} members.providerVersion - semantic version information
* @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 {Number} members.lastSeenDateMs - the date in millis since epoch when the source for this provider last
* contacted the directory
* @param {Number} members.expiryDateMs - the date in millis since epoch when this entry can be purged from the
* directory and caches
* @param {String} members.publicKeyId - the ID of the public key to be used to encrypt messages to
* this provider
* @param {String} members.address - the serialized transport-middleware-specific address where the provider can
* be reached. The address is a subclass of Address
and is stored as a JSON string.
* @returns {GlobalDiscoveryEntry} a new instance of a GlobalDiscoveryEntry
*/
var GlobalDiscoveryEntry = function GlobalDiscoveryEntry(members) {
if (!(this instanceof GlobalDiscoveryEntry)) {
// in case someone calls constructor without new keyword (e.g. var c = Constructor({..}))
return new GlobalDiscoveryEntry(members);
}
/**
* Used for serialization.
* @name GlobalDiscoveryEntry#_typeName
* @type String
* @readonly
*/
Object.defineProperty(this, "_typeName", {
configurable : false,
writable : false,
enumerable : true,
value : "joynr.types.GlobalDiscoveryEntry"
});
/**
* Parent class.
* @name GlobalDiscoveryEntry#_extends
* @type String
* @readonly
*/
Object.defineProperty(this, "_extends", {
configurable : false,
writable : false,
enumerable : false,
value : "joynr.types.DiscoveryEntry"
});
/**
* semantic version information
* @name GlobalDiscoveryEntry#providerVersion
* @type Version
*/
/**
* the domain to register the provider with
* @name GlobalDiscoveryEntry#domain
* @type String
*/
/**
* the name of the provider interface
* @name GlobalDiscoveryEntry#interfaceName
* @type String
*/
/**
* the participant ID of the provider
* @name GlobalDiscoveryEntry#participantId
* @type String
*/
/**
* the qos of the provider
* @name GlobalDiscoveryEntry#qos
* @type ProviderQos
*/
/**
* the date in millis since epoch when the source for this provider last
* contacted the directory
* @name GlobalDiscoveryEntry#lastSeenDateMs
* @type Number
*/
/**
* the date in millis since epoch when this entry can be purged from the
* directory and caches
* @name GlobalDiscoveryEntry#expiryDateMs
* @type Number
*/
/**
* the ID of the public key to be used to encrypt messages to
* this provider
* @name GlobalDiscoveryEntry#publicKeyId
* @type String
*/
/**
* the serialized transport-middleware-specific address where the provider can
* be reached. The address is a subclass of Address
and is stored as a JSON string.
* @name GlobalDiscoveryEntry#address
* @type String
*/
Object.defineProperty(this, 'checkMembers', {
enumerable: false,
value: function checkMembers(check) {
check(this.providerVersion, "Version", "members.providerVersion");
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.lastSeenDateMs, "Number", "members.lastSeenDateMs");
check(this.expiryDateMs, "Number", "members.expiryDateMs");
check(this.publicKeyId, "String", "members.publicKeyId");
check(this.address, "String", "members.address");
}
});
if (members !== undefined) {
this.providerVersion = members.providerVersion;
this.domain = members.domain;
this.interfaceName = members.interfaceName;
this.participantId = members.participantId;
this.qos = members.qos;
this.lastSeenDateMs = members.lastSeenDateMs;
this.expiryDateMs = members.expiryDateMs;
this.publicKeyId = members.publicKeyId;
this.address = members.address;
}
};
/**
* @name GlobalDiscoveryEntry#MAJOR_VERSION
* @constant {Number}
* @default 0
* @summary The MAJOR_VERSION of the struct type GlobalDiscoveryEntry is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(GlobalDiscoveryEntry, 'MAJOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 0
});
/**
* @name GlobalDiscoveryEntry#MINOR_VERSION
* @constant {Number}
* @default 0
* @summary The MINOR_VERSION of the struct type GlobalDiscoveryEntry is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(GlobalDiscoveryEntry, 'MINOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 0
});
var memberTypes = {
providerVersion: function() { return "joynr.types.Version"; },
domain: function() { return "String"; },
interfaceName: function() { return "String"; },
participantId: function() { return "String"; },
qos: function() { return "joynr.types.ProviderQos"; },
lastSeenDateMs: function() { return "Long"; },
expiryDateMs: function() { return "Long"; },
publicKeyId: function() { return "String"; },
address: function() { return "String"; }
};
Object.defineProperty(GlobalDiscoveryEntry, 'getMemberType', {
enumerable: false,
value: function getMemberType(memberName) {
if (memberTypes[memberName] !== undefined) {
return memberTypes[memberName]();
}
return undefined;
}
});
// AMD support
if (typeof define === 'function' && define.amd) {
define("joynr/types/GlobalDiscoveryEntry", ["joynr"], function (joynr) {
GlobalDiscoveryEntry.prototype = new joynr.JoynrObject();
GlobalDiscoveryEntry.prototype.constructor = GlobalDiscoveryEntry;
joynr.addType("joynr.types.GlobalDiscoveryEntry", GlobalDiscoveryEntry);
return GlobalDiscoveryEntry;
});
} else if (typeof exports !== 'undefined' ) {
if ((module !== undefined) && module.exports) {
exports = module.exports = GlobalDiscoveryEntry;
} else {
// support CommonJS module 1.1.1 spec (`exports` cannot be a function)
exports.GlobalDiscoveryEntry = GlobalDiscoveryEntry;
}
var joynr = requirejs("joynr");
GlobalDiscoveryEntry.prototype = new joynr.JoynrObject();
GlobalDiscoveryEntry.prototype.constructor = GlobalDiscoveryEntry;
joynr.addType("joynr.types.GlobalDiscoveryEntry", GlobalDiscoveryEntry);
} else {
GlobalDiscoveryEntry.prototype = new window.joynr.JoynrObject();
GlobalDiscoveryEntry.prototype.constructor = GlobalDiscoveryEntry;
window.joynr.addType("joynr.types.GlobalDiscoveryEntry", GlobalDiscoveryEntry);
window.GlobalDiscoveryEntry = GlobalDiscoveryEntry;
}
})();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy