Previous | Next | Trail Map | Getting Started | JNDI Overview

Event Package

This package(in the API reference documentation) contains classes and interfaces for supporting event notification in naming and directory services. Event notification is described in detail in the Beyond the Basics (in the Beyond the Basics trail) trail.

Naming Events

A NamingEvent(in the API reference documentation) represents 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 NamingListener(in the API reference documentation) is an object that listens for NamingEvents. Each category of event types have a corresponding type of NamingListener. For example, a NamespaceChangeListener(in the API reference documentation) represents a listener interested in namespace change events, while an ObjectChangeListener(in the API reference documentation) represents a listener interested in object change events.

Listener Registration

To receive event notifications, a listener must be registered with either an EventContext(in the API reference documentation) or an EventDirContext(in the API reference documentation). Once registered, the listener will receive event notifications when the corresponding changes occur in the naming/directory service.


Previous | Next | Trail Map | Getting Started | JNDI Overview