diffusion
Version:
Diffusion JavaScript client
42 lines (41 loc) • 2.23 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecondaryAcceptorBuilderImpl = void 0;
var remote_servers_1 = require("./../../../features/remote-servers");
var remote_server_definition_1 = require("./../../services/remote-servers/remote-server-definition");
var require_non_null_1 = require("./../../util/require-non-null");
var secondary_builder_1 = require("./secondary-builder");
/**
* Implementation of {@link SecondaryAcceptorBuilder}.
*
* @since 6.9
*/
var SecondaryAcceptorBuilderImpl = /** @class */ (function (_super) {
__extends(SecondaryAcceptorBuilderImpl, _super);
/**
* Constructor.
*/
function SecondaryAcceptorBuilderImpl(topicSelectors) {
return _super.call(this, remote_servers_1.RemoteServerType.SECONDARY_ACCEPTOR, topicSelectors) || this;
}
SecondaryAcceptorBuilderImpl.prototype.build = function (name, primaryHostName) {
return remote_server_definition_1.RemoteServerDefinitionImpl.createSecondaryDefinition(remote_servers_1.RemoteServerType.SECONDARY_ACCEPTOR, SecondaryAcceptorBuilderImpl.validateName(name), require_non_null_1.requireNonNull(primaryHostName, 'primaryHostName'), this.getPrincipal(), this.getConnectionOptions(), this.getMissingTopicNotificationFilter(), this.getCredentials());
};
return SecondaryAcceptorBuilderImpl;
}(secondary_builder_1.SecondaryBuilderImpl));
exports.SecondaryAcceptorBuilderImpl = SecondaryAcceptorBuilderImpl;