Package laas.openrobots.ontology.modules.events
package laas.openrobots.ontology.modules.events
Provides the cognitive event manager module.
Overview of the events usage
Events are triggered by so-called Watchers (classes that implement the
IWatcher
interface).
A watcher stores the type of event (cf IWatcher.EventType
) along with the
pattern (the form of the pattern depends on the type of event, as documented here:
IWatcher.EventType
).
For convenience, a generic watcher (GenericWatcher
)
is provided, as well as more specialized ones like NewClassInstanceWatcher
.
The events can eventually be registered to an ontology
backend by calling IOntologyBackend.registerEvent(IWatcher)
.
Examples can be found in the EventsTest
test-suite.
- Since:
- 0.3.2
-
ClassDescriptionThis class allows the registration of event by external client through the
#registerEvent(String, String, Set, IEventConsumer)
RPC method.This interface is intended to be implemented by classes that are expected to be notified when some event occurs, thus consuming the event.Interface to patterns that may trigger events.Constants that defines the type of event the event module can handle.Constants that defines the way an event is triggered.This class specializesGenericWatcher
to easily create event watchers that monitor new instances of a given class.