![]() ![]() ![]() ![]() |
JNDI Overview |
The javax.naming.eventpackage contains classes and interfaces for supporting event notification in naming and directory services. Event notification is described in detail in the Beyond the Basics
trail.
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, event types are categorized into those that affect the namespace, such as "object added," and those that do not, such as "object changed." A NamingEvent also contains other information about the change, such as information about the object before and after the change.
Listeners
A NamingListeneris an object that listens for NamingEvents. Each category of event type has a corresponding type of NamingListener. For example, a NamespaceChangeListener
represents a listener interested in namespace change events and an ObjectChangeListener
represents a listener interested in object change events.
To receive event notifications, a listener must be registered with either an EventContext
or an EventDirContext
. Once registered, the listener will receive event notifications when the corresponding changes occur in the naming/directory service.
![]() ![]() ![]() ![]() |
JNDI Overview |