Public constructor. This constructor is called once when the BusHandler Spawns this BusWorker.
This method should only be invoked by the BusHandler.
Private
Readonly
changesBehaviorSubject emitting every time when changes occur on the internal streams or uplinks mappings. This emittance is used to recombine the Observable streams which were previously obtained to through use of the observe method.
Private
Readonly
streamsPrivate
Readonly
uplinksInvoking this method observes all Observable streams
under the supplied handle
by mergeing all streams which
are published under the supplied handle
.
The type of the observed Observable stream.
The Bus.Handle to observe.
An Observable stream for handle
.
This method should only be invoked by the BusHandler.
Invoking this method publishes the supplied ObservableInput
stream
under the supplied handle
. Any emittance of the published
stream
will be materialized into Bus.Values and replayed
once to every observer.
The type of the published Observable stream.
The Bus.Handle to publish under.
The ObservableInput stream
for handle
.
A Promise of the stream
publishment.
A ReferenceError on collision of handle
s.
This method should only be invoked by the BusHandler.
Invoking this method uplinks the supplied handle
to the supplied
url
by establishing a WebSocket connection between the endpoint
behind the supplied url
and this BusWorker. It is assumed, that
all messages emanating from the WebSocket endpoint conform to the
Bus.Value type and are therefore treated as such. This treatment
includes the filtering of all received and submitted messages by comparing
their corresponding Bus.Handle and the supplied handle
.
The Bus.Handle to uplink.
The endpoint url
to establish an uplink to.
A Promise of the Subscription to the uplink.
A ReferenceError on collision of handle
s.
This method should only be invoked by the BusHandler.
Generated using TypeDoc
The BusWorker is a background Thread which is Spawned by the BusHandler to handle all published and observed streams, uplinks and their aggregation depending on their hierarchy.
Decorator
Thread
Decorator
Singleton
See
BusHandler