|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Interface Summary | |
|---|---|
| ActivemathEventListener | Interface to be implemented by application event listeners. |
| ActivemathEventListenerBatched | An event listener that can receive a batch of events. |
| ActivemathEventMulticaster | Subinterface of ActivemathEventListener to be implemented by listeners that can broadcast events to other listeners. |
| ActivemathEventPublisher | Basic interface for an event publisher. |
| ActivemathEventSubscriptionService | Interface for event subscription. |
| Class Summary | |
|---|---|
| ActivemathEvent | Abstract base class for Activemath events. |
Provides the Activemath event system. The ActiveMath Event Framework is a mechanism that provides powerful and flexible, yet rather loose integration of components. Typically, components need just a quick notification when events of interest occur in another service or component.
An example for event publication is the following: when the learner is finished working on an exercise, the exercise subsystem issues an event. This event carries information describing the learner, the identifier of the exercise, the success rate, the time stamp of the event, etc. Listeners to such an event can be the learner model as well as the suggestor of the tutorial component.
In contrast to a full-fledged messaging model, events are not sent from a specific sender to a specific recipient but remain anonymous: when publishing an event, the component is usually not aware who is listening to the events (only the module managing the subscriptions is). Also, usually the listener does not care which component or module created the event, it only knows where to subscribe to the events it is interested in.
type
EventManager
(via publishEvent())
ActivemathEventListener
(via subscribe()) will be notified of the event
(via onActivemathEvent()))
EventManager is asynchronous, which means listeners do not block each others.
Each event message object consists of attributes. The attributes
common to all ActivemathEvents are:
subclass.
It is often desirable to group event types across several dimensions. However, events don't fit well into a rigid type hierarchy (e.g. is "user logged in" an application event? An user event? An interaction event?).
Therefore, ActiveMath uses event tags. Tags are labels for
event types. Each event type can be associated to zero or more
tags. Tag definitions can be nested, that is, a tag can inherit from
another one. Multiple inheritance is allowed.
Tags can add attributes to an event. For example, the UserEventTag
adds the attribute userId to an event. Tags defined without
attributes (such as ApplicationEventTag) just serve as marker
tags. The following attributes are found in event tags, among others:
UserEventTag - user associated with this event
SessionEventTag - browser session associated with this event
InteractionEventTag - couples user and session
SessionEventTag - content item associated with this event
org.activemath.events.impl contains useful utility classes:properties or xml.
properties or xml.
event filters.
XmlrpcEventService.
org.activemath.events.log provides event logging:
events can be logged toulog files or
database.
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||