Name

EventContext

Synopsis

The EventContext interface is implemented by NamingContexts that support event notification. It provides methods for adding and removing NamingListeners associated with specific named targets in the namespace.

                  Event Listeners
public interface EventContext extends javax.naming.Context {
// Public Constants
   public static final int OBJECT_SCOPE;                         // =0
   public static final int ONELEVEL_SCOPE;                       // =1
   public static final int SUBTREE_SCOPE;                        // =2
                  // Event Registration Methods (by event name)
   public abstract void removeNamingListener(
        NamingListener l) throws NamingException;  
// Public Instance Methods
   public abstract void addNamingListener(String target, 
        int scope, 
        NamingListener l) throws NamingException;  
   public abstract void addNamingListener(
        javax.naming.Name target, int scope, 
        NamingListener l) throws NamingException;  
   public abstract boolean targetMustExist(
        ) throws NamingException;  
}

Implementations

EventDirContext

Passed To

NamingEvent.NamingEvent(), NamingExceptionEvent.NamingExceptionEvent()

Returned By

NamingEvent.getEventContext(), NamingExceptionEvent.getEventContext()

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.