IoRouter
public class IoRouter : Controller
Base IO router class for context-driven routing of IO values.
This router implements the base logic of routing. It observes IO nodes that are associated with the router’s IO context and manages routes for the IO sources and actors of these nodes.
This router implements a basic routing algorithm where all compatible pairs
of IO sources and IO actors are associated. An IO source and an IO actor are
compatible if both define equal value types in equal data formats. You
can define your own custom compatibility check on value types in a subclass
by overriding the areValueTypesCompatible
method.
To implement context-specific routing strategies extend this class and implement the methods marked with the fatal error: “This method must be overridden”
Note that this router makes its IO context available for discovery (by core
type, object type, or object Id) and listens for Update-Complete events on
its IO context, triggering onIoContextChanged
automatically.
This base router class requires the following controller options:
ioContext
: the IO context for which this router is managing routes (mandatory) Otherwise a fatalError is thrown
-
Declaration
Swift
public override func onInit()
-
Declaration
Swift
public override func onCommunicationManagerStarting()
-
Declaration
Swift
public override func onCommunicationManagerStopping()