Handler#
- class capymoa.ocl.events.Handler[source]#
Bases:
ABCAbstract interface for components that consume events.
A sink encapsulates subscription logic and can attach itself to an
Dispatcher.Subclass
Handlerand implementattach_with()to register the sink’s handlers with a source.- abstract attach_with(
- dispatcher: Dispatcher,
Attach this sink to an event source.
Implementations should call
capymoa.ocl.events.Dispatcher.subscribe()for each event type the sink needs to handle.- Parameters:
dispatcher – The source this sink should subscribe to.