Close the specified topic name. If there is currently no message topic created or no one subsribing to this topic, this
method will do nothing. Otherwise, the subscriber's complete handler function will be triggered. Note that, we use the method name
complete instead of close since we try to use the same naming as RxJS does as much as possible.
The message topic name to close.
To check that there already is RxJS's Subject object bound to the given topic
name or not.
A message topic name to check.
Create a new Subject (or topic) and map it to the given topic name. This method will return
the old object instance if the given "name" already exists.
A message topic name to create Subject.
Signal error message to the given topic name. The subscriber's error function will be
triggered with the given error passed as a parameter. This method will automatically create the topic if the given
topic name is not created yet.
The message topic name to signal.
The error message to signal.
Get the RxJS's Subject object bound to the given topic name.
A message topic name to get.
Returns null if the given topic name is not created yet.
Publish a message (data) to the given topic name. The subscriber's handler function will be
triggered with the given data passed as a parameter. This method will automatically create the topic if the given
topic name is not created yet.
The message topic name to publish.
The message data to publish.
Subscribe message to the given topic name. This method will automatically create the topic if the given
topic name is not created yet.
A message topic name to subscribe.
A message handler function which will be triggered when message arrives.
An error handler function which will be triggered when any error occurs on the [[Observer]].
A handler function which will be triggered when the topic is closed and not publishes any messages anymore.
A RxJS's Subscription object returning from Subject.subscribe() method.
Generated using TypeDoc
A
ngservice which is mainly responsible for providing publish/subscribeMessaging API. You can easily create/publish/subscribe amessage topicby using this service. This service usesRxJS'sObservable / Subject APIas a core engine. Neverthelss, it does not require you to have any background onRxJSsince it simplifies theRxJS's API by providing a new way to use it. For example, inRxJS's normal way, you may need to keep a reference to anSubjectobject all the time in which that themessage topicis still active. Moreover, if you have moremessage topics to handle, you must keep moreSubjectinstance references separately. In spite of that, this service diminishes those struggles by mapping eachSubjectobject instance to atopic name. When you want to interact with those topics, you could simply supply thetopic nameto this service. For more information, please see methods of this class below.If you only want to publish/subscribe to a topic. Please see publish and subscribe method below.
shiorin, tee4cute