APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.jndi.ldap

pack-priv final Class NamingEventNotifier

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable
Imports
javax.naming.*, javax.naming.directory.*, javax.naming.event.*, javax.naming.ldap.*, .LdapName, java.util.Vector, com.sun.jndi.toolkit.ctx.Continuation, jdk.internal.misc.InnocuousThread

Gathers information to generate events by using the Persistent Search control.

This class maintains a list of listeners all interested in the same "search" request. It creates a thread that does the persistent search and blocks, collecting the results of the search. For each result that it receives from the search, it fires the corresponding event to its listeners. If an exception is encountered, it fires a NamingExceptionEvent.

Author
Rosanna Lee

Field Summary

Modifier and TypeField and Description
private LdapCtx
private static final boolean
private EventContext
pack-priv NotifierArgs
private Vector<NamingListener>
private NamingEnumeration<SearchResult>
private EventSupport
private Thread

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
private void
private void
private void
fireObjectAdded(Binding newBd, long changeID)

Fire an "object added" event to registered NamingListeners.

private void
fireObjectChanged(Binding newBd, long changeID)

Fires an "object changed" event to registered NamingListeners.

private void
fireObjectRemoved(Binding oldBd, long changeID)

Fire an "object removed" event to registered NamingListeners.

private void
fireObjectRenamed(Binding newBd, String oldDN, long changeID)

Fires an "object renamed" to registered NamingListeners.

pack-priv boolean
pack-priv void
public void
run()

Implements java.lang.Runnable.run.

Execute "persistent search".

pack-priv void
stop()

Stop the dispatcher so we can be destroyed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private LdapCtx context
debugback to summary
private static final boolean debug
eventSrcback to summary
private EventContext eventSrc
infoback to summary
pack-priv NotifierArgs info
namingListenersback to summary
private Vector<NamingListener> namingListeners
resultsback to summary
private NamingEnumeration<SearchResult> results
supportback to summary
private EventSupport support
workerback to summary
private Thread worker

Constructor Detail

NamingEventNotifierback to summary
pack-priv NamingEventNotifier(EventSupport support, LdapCtx ctx, NotifierArgs info, NamingListener firstListener) throws NamingException

Method Detail

addNamingListenerback to summary
pack-priv void addNamingListener(NamingListener l)
cleanupback to summary
private void cleanup()
fireNamingExceptionback to summary
private void fireNamingException(NamingException e)
fireObjectAddedback to summary
private void fireObjectAdded(Binding newBd, long changeID)

Fire an "object added" event to registered NamingListeners.

fireObjectChangedback to summary
private void fireObjectChanged(Binding newBd, long changeID)

Fires an "object changed" event to registered NamingListeners.

fireObjectRemovedback to summary
private void fireObjectRemoved(Binding oldBd, long changeID)

Fire an "object removed" event to registered NamingListeners.

fireObjectRenamedback to summary
private void fireObjectRenamed(Binding newBd, String oldDN, long changeID)

Fires an "object renamed" to registered NamingListeners.

hasNamingListenersback to summary
pack-priv boolean hasNamingListeners()
removeNamingListenerback to summary
pack-priv void removeNamingListener(NamingListener l)
runback to summary
public void run()

Implements java.lang.Runnable.run.

Execute "persistent search". For each result, create the appropriate NamingEvent and queue to be dispatched to listeners.

Annotations
@Override
stopback to summary
pack-priv void stop()

Stop the dispatcher so we can be destroyed. package private; used by EventSupport