Package org.activemath.events

Provides the Activemath event system.

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.
 

Package org.activemath.events Description

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.

Publishers and Listeners

When a sender wants to notify the rest of the system of an event, the following steps happen: Event delivery for EventManager is asynchronous, which means listeners do not block each others.

Event Types

Each event message object consists of attributes. The attributes common to all ActivemathEvents are:

Every event type of interest in Activemath has its own subclass.

Event Tags

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:

Varia