tdl-client-nodejs
Version:
A NodeJs client that allows users to get up to speed with the TDL system.
41 lines (33 loc) • 969 B
JavaScript
;
var QueueBasedImplementationRunner = require("./queue_based_implementation_runner");
var ProcessingRules = require("./processing_rules");
function QueueBasedImplementationRunnerBuilder() {
this._deployProcessingRules = new ProcessingRules();
this._deployProcessingRules
.on("display_description")
.call(function() {
return "OK";
})
.build();
}
QueueBasedImplementationRunnerBuilder.prototype.setConfig = function(config) {
this._config = config;
return this;
};
QueueBasedImplementationRunnerBuilder.prototype.withSolutionFor = function(
methodName,
userImplementation
) {
this._deployProcessingRules
.on(methodName)
.call(userImplementation)
.build();
return this;
};
QueueBasedImplementationRunnerBuilder.prototype.create = function() {
return new QueueBasedImplementationRunner(
this._config,
this._deployProcessingRules
);
};
module.exports = QueueBasedImplementationRunnerBuilder;