/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Gathers information to generate events by using the Persistent Search
* control.
*<p>
* 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
*/
private final static boolean debug = false;
// package private; used by EventSupport to remove it
try {
psearch = new PersistentSearchControl(
true /* no info about original entry(s) */,
true /* additional info about changes */,
"Problem creating persistent search control");
ne.setRootCause(e);
throw ne;
}
// Add psearch control to existing list
namingListeners = new Vector();
}
// package private; used by EventSupport; namingListener already synchronized
}
// package private; used by EventSupport; namingListener already synchronized
}
// package private; used by EventSupport; namingListener already synchronized
boolean hasNamingListeners() {
}
/**
* Execute "persistent search".
* For each result, create the appropriate NamingEvent and
* queue to be dispatched to listeners.
*/
public void run() {
try {
true, false, cont);
// Change root of search results so that it will generate
// names relative to the event context instead of that
// named by nm
long changeNum;
if (debug) {
}
// Just process ECs; ignore all the rest
// %%% Should be checking OID instead of class
// %%% in case using someone else's EC ctl
if (respctls[i] instanceof EntryChangeResponseControl) {
switch (ec.getChangeType()) {
break;
break;
break;
break;
}
}
break;
}
}
}
} catch (InterruptedNamingException e) {
} catch (NamingException e) {
// Fire event to notify NamingExceptionEvent listeners
// This notifier is no longer valid
} finally {
cleanup();
}
}
private void cleanup() {
try {
}
}
} catch (NamingException e) {}
}
/**
* Stop the dispatcher so we can be destroyed.
* package private; used by EventSupport
*/
void stop() {
}
}
/**
* Fire an "object added" event to registered NamingListeners.
*/
return;
}
/**
* Fire an "object removed" event to registered NamingListeners.
*/
return;
}
/**
* Fires an "object changed" event to registered NamingListeners.
*/
return;
// Name hasn't changed; construct old binding using name from new binding
NamingEvent e = new NamingEvent(
}
/**
* Fires an "object renamed" to registered NamingListeners.
*/
return;
try {
}
} catch (NamingException e) {}
}
NamingEvent e = new NamingEvent(
}
return;
}
}