![]() ![]() ![]() ![]() |
JNDI Overview |
This packagecontains classes and interfaces for supporting event notification in naming and directory services. Event notification is described in detail in the Beyond the Basics
trail.
Naming Events
A NamingEventrepresents an event that is generated by a naming/directory service. The event contains a type that identifies the type of event. For example, an event type could be "object added" or "object changed." Event types are categorized into those that affect the namespace (such as "object added") and those that do not (such as "object changed"). In addition to the event's type, a NamingEvent contains other information about the change, such as information about the object before and after the change.
Naming Listeners
A NamingListeneris an object that listens for NamingEvents. Each category of event types have a corresponding type of NamingListener. For example, a NamespaceChangeListener
represents a listener interested in namespace change events, while an ObjectChangeListener
represents a listener interested in object change events.
Listener Registration
To receive event notifications, a listener must be registered with either an EventContextor an EventDirContext
. Once registered, the listener will receive event notifications when the corresponding changes occur in the naming/directory service.
![]() ![]() ![]() ![]() |
JNDI Overview |