Gets the communication manager's current effective communication options (read-only).
Gets the container's Runtime object.
Creates a new IO route for routing IO values of the given IO source to associated IO actors.
This method is called by IO routers to associate IO sources with IO actors. An IO source publishes IO values on this route; an associated IO actor observes this route to receive these values.
the IO source object
an associating topic for routing IO values
Gets the IO node for the given IO context name, as configured in the configuration common options.
Returns undefined if no IO node is configured for the context name.
Observe Advertise events for the given core type.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
core type of objects to be observed.
an observable emitting inbound Advertise events
Observe Advertise events for the given object type.
The given object type must be a non-empty string that does not contain
the following characters: NULL (U+0000)
, # (U+0023)
, + (U+002B)
, / (U+002F)
.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
object type of objects to be observed.
an observable emitting inbound Advertise events
Observe Call events for the given operation and context object.
The operation must be a non-empty string that does not contain the
following characters: NULL (U+0000)
, # (U+0023)
, + (U+002B)
, / (U+002F)
.
The given context object is matched against the context filter specified in inbound Call event data to determine whether the Call event should be emitted or skipped by the observable.
A Call event is not emitted by the observable if:
ObjectMatcher.matchesFilter
), orIn all other cases, the Call event is emitted.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
the name of the operation to be invoked
a context object to be matched against the Call event data's context filter (optional)
an observable emitting inbound Call events whose context filter matches the given context
Observe Channel events for the given channel identifier.
The channel identifier must be a non-empty string that does not contain
the following characters: NULL (U+0000)
, # (U+0023)
, + (U+002B)
, / (U+002F)
.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
a channel identifier
an observable emitting inbound Channel events
Observe communication state changes.
When subscribed the observable immediately emits the current communication state.
an observable emitting communication state changes
Observe Deadvertise events.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
an observable emitting inbound Deadvertise events
Observe Discover events.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
an observable emitting inbound Discover events
Observe IO state events for the given IO source or actor.
When subscribed the subject immediately emits the current association state.
Subscriptions to the returned subject are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
a subject emitting IO state events for the given IO source or actor
Observe IO values for the given IO actor.
Depending on the data format specification of the IO actor
(IoActor.useRawIoValues
), values emitted by the observable are either
raw binary (Uint8Array, or Buffer in Node.js) or decoded as JSON objects.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
an observable emitting inbound values for the IO actor
Observe operating state changes.
When subscribed the observable immediately emits the current operating state.
an observable emitting operating states
Observe Query events.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
an observable emitting inbound Query events
Observe matching inbound messages on a raw subscription topic.
This method returns an observable that emits messages as tuples including
the actual publication topic and the payload. Payload is represented as
Uint8Array
(or Buffer
in Node.js, a subclass thereof) and needs to be
decoded by the application. Use the toString
method on a payload to
convert the raw data to a UTF8 encoded string.
Use this method to interoperate with external systems that publish
messages on external topics. Use this method together with publishRaw()
to transfer arbitrary binary data between Coaty agents.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
binding-specific subscription topic
binding-specific subscription options (optional)
an observable emitting any matching inbound messages as tuples containing the actual topic and the payload as Uint8Array (or Buffer in Node.js, a subclass thereof)
Observe Update events for the given core type.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
core type of objects to be observed.
an observable emitting inbound Update events
Observe Update events for the given object type.
The given object type must be a non-empty string that does not contain
the following characters: NULL (U+0000)
, # (U+0023)
, + (U+002B)
, / (U+002F)
.
Subscriptions to the returned observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
object type of objects to be observed
an observable emitting inbound Update events
Perform clean-up side effects, such as stopping the communication manager and deallocating resources.
Advertise an object.
the Advertise event to be published
Called by an IO router to associate or disassociate an IO source with an IO actor.
the Associate event to be published
Publish a Call event to request execution of a remote operation and receive results.
Note that the Call event is lazily published when the first observer subscribes to the observable.
After all initial subscribers have unsubscribed no more response events will be emitted on the observable and an error will be emitted on resubscription.
Subscriptions to the observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
the Call event to be published
an observable of associated Return events
Publish a channel event.
the Channel event to be published
Notify subscribers that an advertised object has been deadvertised.
the Deadvertise event to be published
Find discoverable objects and receive Resolve events for them.
Note that the Discover event is lazily published when the first observer subscribes to the observable.
After all initial subscribers have unsubscribed no more response events will be emitted on the observable and an error will be emitted on resubscription.
Subscriptions to the observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
the Discover event to be published
an observable on which associated Resolve events are emitted
Publish the given IoValue event.
No publication is performed if the event's IO source is currently not associated with any IO actor.
the IoValue event for publishing
the IO source for publishing
a JSON compatible or binary value to be published
Find queryable objects and receive Retrieve events for them.
Note that the Query event is lazily published when the first observer subscribes to the observable.
After all initial subscribers have unsubscribed no more response events will be emitted on the observable and an error will be emitted on resubscription.
Subscriptions to the observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
the Query event to be published
an observable on which associated Retrieve events are emitted
Publish a raw payload on a given topic.
Use this method to interoperate with external systems that subscribe on this
topic. Use this method together with observeRaw()
to transfer arbitrary
binary data between Coaty agents.
the Raw event for publishing
the topic on which to publish the given payload
a payload string or Uint8Array (or Buffer in Node.js, a subclass thereof) to be published on the given topic
whether to publish a retained message (default false)
Request or propose an update of the specified object and receive accomplishments.
Note that the Update event is lazily published when the first observer subscribes to the observable.
After all initial subscribers have unsubscribed no more response events will be emitted on the observable and an error will be emitted on resubscription.
Subscriptions to the observable are automatically unsubscribed when the communication manager is stopped, in order to release system resources and to avoid memory leaks.
the Update event to be published
an observable of associated Complete events
new communication options to be used for a restart (optional)
a promise that is resolved when restart has been completed.
Starts or restarts this communication manager joining the communication
infrastructure with effective communication options specified in the
configuration augmented by those in the optional options
parameter.
If no options are given, this operation does nothing if the communication
manager is already in Started
operating state; otherwise, i.e. in
Stopped
state, the communication manager is started with the
communication options specified in the container configuration.
If partial options are given, the communication manager is stopped if in
Started
operating state. Afterwards, it is started (again) with the
given partial options merged with the communication options specified in
the container configuration. Partial options override configuration
options. This is useful if you want to re-establish communication after
changing communication options on the fly.
Note that further actions, like publishing or observing events, should only be taken after the returned promise resolves.
new communication options to be used for a (re)start (optional)
a promise that is resolved when start-up has been completed.
Stops dispatching and emitting communication events and unjoins from the communication infrastructure.
To continue processing with this communication manager sometime later,
invoke start()
, but not before the returned promise resolves.
a promise that is resolved when communication manager has unjoined the communication infrastructure.
Generated using TypeDoc
Provides a set of predefined communication events to transfer Coaty objects between distributed Coaty agents based on publish-subscribe messaging.