The member Unit that is intended to portray the role of response
aspect of an async task.
The member Unit that is intended to portray the role of error
aspect of an async task.
The member Unit that is intended to portray the role of pending-status
of an async task.
The member Unit that is intended to portray the role of query
aspect of an async task.
Configured options.
Combination of global-options GlobalAsyncSystemConfig and the options passed on instantiation.
On-demand observable events. See https://docs.activejs.dev/guides/events for more details.
An Observable to observe future values, unlike the default Observable it doesn't replay when subscribed to, rather it waits for the next value.
A counter to keep track of how many times has a Unit, System, Action or Cluster emitted.
Number of times a Unit, System, Action or Cluster has emitted.
To check whether the inter-relationships among the member Units are active or not.
Combined value of all the member Units.
Creates a new Observable using the default Observable as source. Use this to conceal other aspects of a Unit, System, Action or Cluster except the Observable part.
An Observable with the value of a Unit, System, Action or Cluster.
A helper method that creates a stream by subscribing to the Observable returned by the param observableProducer
callback.
Ideally the callback function creates an Observable by applying Observable.pipe
on the queryUnit or queryUnit.future$
as source Observable.
Then, after a successful data flow, dispatch the data to the dataUnit;
and after a failure, dispatch the error to the errorUnit, caught by using RxJS' catchError operator.
Just know that you should catch the error in a sub-pipe (ie: do not let it propagate to the main-pipe), otherwise as usual the stream will stop working, and will not react on any further emissions.
A callback function that should return an Observable.
To manually re-emit the last emitted value again.
Converts the value to JSON string, using JSON.stringify
.
To pause inter-relationships among the member Units. Also see relationshipsWorking.
When inter-relationships are paused, you can perform any number of operations on the member Units without triggering the automatic relationships like AsyncSystemBaseConfig.clearErrorOnData, AsyncSystemBaseConfig.autoUpdatePendingValue, etc.
This also means that the AsyncSystem stops emitting new values.
To resume inter-relationships among the member Units. Also see relationshipsWorking.
It restores the inter-relationships like AsyncSystemBaseConfig.clearErrorOnData, AsyncSystemBaseConfig.autoUpdatePendingValue, etc.
This also means that the AsyncSystem starts emitting new values.
And if any of the member Units emitted a value while the relationships were paused,
the AsyncSystem will emit a new value immediately to bring itself and its subscribers in sync
with the member Units.
AsyncSystem is a reactive storage System, to store, replay and wait for simple async tasks.
An AsyncSystem is a systematic combination of four Units. one each for every aspect of an asynchronous task or API,
e.g.: XHR, fetch or a third party abstraction like Angular's HttpClient.
See https://docs.activejs.dev/fundamentals/systems/asyncsystem for more details.
Observable