Readonly
onAn observable which holds the incremental data change. this will be triggered, if the an emitter (publisher) changes its data. Contains only the last emitted data and the topic
// Describe the required Test:
let pubSubSystem = new PubSubSystemBase({
generateEmitterType: function () {
return new NopeEventEmitter() as INopeEventEmitter;
},
});
// Create a Publisher for the system:
let publisher: INopeEventEmitter = new NopeEventEmitter();
pubSubSystem.register(publisher, {
mode: "publish",
schema: {},
topic: "this/is/a/test",
});
pubSubSystem.onIncrementalDataChange.subscribe(console.log);
publisher.emit("Hello World!"); // Logs the following => {path: "this/is/a/test", data: "Hello World!"}
M.Karkowski
IPubSubSystem
Readonly
publishersList containing all publishers.
M.Karkowski
IPubSubSystem
Readonly
subscriptionsList, containing all subscribers.
M.Karkowski
IPubSubSystem
A Getter to return a COPY of the item. Outside of the system, you'll never receive the original object. It is allways a clone.
M.Karkowski
PubSubSystemBase
List all known Emitters in the System.
Options which describe the Behavior
M.Karkowski
IPubSubSystem
Helper, to update the Matching. But, we are just considering
Optional
options: ITopicSetContentOptionsOption to push data to the system using a pattern see patternBasedPush @ IDataPubSubSystem
Nothing
The pattern (see pubSub)
The data to push
The options used during pushing the data (see IEventAdditionalData)
If enabled, firstly, the data is pushed, afterwards, we just inform once.
Option to pull data from the system with a pattern see patternbasedPullData @ IDataPubSubSystem
The pattern (see pubSub)
The Default object, if data is not present.
The path of the data.
The content of the Data.
The options used during pushing the data (see IEventAdditionalData)
Function to register an Observable. Please define the Options, to decide whether the data of the observable should be published or subscribed.
M.Karkowski
{O}
IPubSubSystem
The Emitter to consider
A Helper, that allows the user to subscribe to changes. Therfore he must transmit
M.Karkowski
{INopeObserver}
IPubSubSystem
Expected Type of the content
The
Describes the Data.
Removes an observable of the Pub-Sub-System.
M.Karkowski
{boolean}
IPubSubSystem
Function to update the options and there by the topics of an observable.
M.Karkowski
IPubSubSystem
The Emitter to consider
The modified options
Generated using TypeDoc
Default implementation of IDataPubSubSystem
Extends the PubSubSystem by adding the following properties and methods:
pushData
to push data into the system.pullData
to pull data from the system. Will allways return the current data or the default value if no data is present at the given path.patternbasedPullData
to pull data with a given pattern. See the example for details.patternBasedPush
to push data with a given pattern into the system.data
which will contain the entire data root that has been created.