Allow Dataspace subclasses to extend endpoint-addition behaviour
This commit is contained in:
parent
3e3761ee89
commit
066920b771
|
@ -238,6 +238,9 @@ Dataspace.prototype.unsubscribe = function (handler) {
|
||||||
this.index.removeHandler(handler, handler.callback);
|
this.index.removeHandler(handler, handler.callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Dataspace.prototype.endpointHook = function (facet, endpoint) {
|
||||||
|
};
|
||||||
|
|
||||||
function Actor(dataspace, name, initialAssertions) {
|
function Actor(dataspace, name, initialAssertions) {
|
||||||
this.id = dataspace.nextId++;
|
this.id = dataspace.nextId++;
|
||||||
this.dataspace = dataspace;
|
this.dataspace = dataspace;
|
||||||
|
@ -554,7 +557,9 @@ Facet.prototype.addStopScript = function (s) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Facet.prototype.addEndpoint = function (updateFun, isDynamic) {
|
Facet.prototype.addEndpoint = function (updateFun, isDynamic) {
|
||||||
return new Endpoint(this, isDynamic === void 0 ? true : isDynamic, updateFun);
|
const ep = new Endpoint(this, isDynamic === void 0 ? true : isDynamic, updateFun);
|
||||||
|
this.actor.dataspace.endpointHook(this, ep);
|
||||||
|
return ep;
|
||||||
};
|
};
|
||||||
|
|
||||||
Facet.prototype.addDataflow = function (subjectFun, priority) {
|
Facet.prototype.addDataflow = function (subjectFun, priority) {
|
||||||
|
|
Loading…
Reference in New Issue