...
Also within the core and associated closely with the Manager, Stores have the task of indexing, persisting, and synchronizing the information received by the Manager. This includes ensuring consistency and robustness of information across multiple ONOS instances by directly communicating with stores on other ONOS instances. Further discussion of Stores in distributed settings is found in Distribution.
Application
Applications consume and manipulate information aggregated by the managers via the AdminService
and Service interfaces. Applications have a wide range of functionality, ranging from displaying network topologies in a web browser to setting up paths for network traffic.
...
Events are used by Managers to notify its listeners about changes in the network, and by Stores to notify their peers of events in a distributed setting. An Event is comprised of a event type and a subject.
For example, a DeviceEvent
can be used to notify DeviceListeners
that a device (the subject) has been detected (DEVICE_ADDED
), lost (DEVICE_REMOVED
), or some aspect of it has changed (DEVICE_UPDATED
), among others.
Event dispatch
Events are generated by the Store, and dispatched by the Manager via the EventDeliveryService
based on input from the Manager. Once generated, an Event is dispatched to interested listeners via the StoreDelegate
interface, which ultimately invokes the EventDeliveryService
. Essentially, the StoreDelegate
moves the event out of the store, and the EventDevliveryService
ensures that the event only reaches interested listeners. Due to how they interact, these two components reside in the Manager, where the manager provides the implementation class of the StoreDelegate
to the store.
Event Listeners
Event listeners are any components that implement the EventListener
interface. EventListener
child interfaces are classified by the type of Event
subclass they listen for. The typical mode of implementation is for an Event listener to be an inner class of a manager, from which the appropriate services are invoked. This restricts the handling of events external to a subsystem to the manager.
Network representations
ONOS maintains protocol-agnostic representations of various network elements and properties. Events carry these representations as their subject body. These representations are built from the information found in Descriptions by the system core.
...