This package defines the internal events used by WildCAT to
track changes in the context. These events are slightly different
from the ones used for user-level notifications: user-level event
notifications are represented by method calls to the different
methods defined in {@link org.objectweb.wildcat.ContextListener
ContextListener}, while internal events are reified as objects, so
that they can be manipulated (buffered, logged, passed to
different threads, etc.) more easily.
Three kinds of events are defined:
- path creation ({@link PathCreatedEvent}) indicate that a new
resource or attribute has appeared in the context;
- path removal ({@link PathRemovedEvent}) indicate that a resource
or attribute has disappeared from the context;
- path change ({@link PathChangedEvent}) indicate that the value
of an attribute has changed.
These three classes inherit from {@link PathEvent} which provides two attributes
common to all event kinds:
- the path at which the event occured;
- a timestamp indicating when the event occurred.
Classes which want to be notified of event must implement the {@link EventListener}
interface.
This package also provides some utilities to deal with these events:
- {@link EventBuffer} is a listener which stores the events it receives for later
(possibly asynchronous) processing.
- {@link EventSource} can be subclassed by classes which generate events to send
them to a listener.
- {@link EventForwarder} is both an {@link EventListener} and an {@link EventSource},
i.e; it forwards all the event notifications it receives to its own listener.
- {@link EventMultiplexer} is an {@link EventListener} which broadcasts all the
events it receives to a dynamically configurable set of target listeners (1-to-many
event multiplexer).
-