LDAP Classes
Implements Java LDAP

com.novell.ldap.events
Class PsearchEventSource

java.lang.Object
  extended bycom.novell.ldap.events.LDAPEventSource
      extended bycom.novell.ldap.events.PsearchEventSource

public class PsearchEventSource
extends LDAPEventSource

This Class is responsible for generation of Persistence Search Events.


Nested Class Summary
 
Nested classes inherited from class com.novell.ldap.events.LDAPEventSource
LDAPEventSource.EventsGenerator
 
Constructor Summary
PsearchEventSource()
           
 
Method Summary
 void registerforEvent(LDAPConnection conn, java.lang.String searchBase, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchConstraints constraints, int eventchangetype, boolean changeonly, PSearchEventListener alistener)
          This method is use to register for Persistence Search Events by the given Listener.
 void removeListener(PSearchEventListener alistener)
          Removes a listener from receiving Persistence Search events fired by this class.The listener may have registered more than once with this PSearchEventSource, perhaps with different events request arguments.
 
Methods inherited from class com.novell.ldap.events.LDAPEventSource
createListeningThread, getSleepTime, pollforevents, setSleepTime, stopeventpolling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PsearchEventSource

public PsearchEventSource()
Method Detail

removeListener

public final void removeListener(PSearchEventListener alistener)
                          throws LDAPException
Removes a listener from receiving Persistence Search events fired by this class.The listener may have registered more than once with this PSearchEventSource, perhaps with different events request arguments. After this method is invoked, the listener will no longer receive events with this PSearchEventSource instance as the event source (except for those events already in the process of being dispatched). If the listener was not, or is no longer, registered with this PSearchEventSource instance, this method does not do anything.

Parameters:
alistener - Removes the listener from receiving the events fired by this PSearchEventSource.
Throws:
LDAPException - If problem is encountered while removing the listener.

registerforEvent

public final void registerforEvent(LDAPConnection conn,
                                   java.lang.String searchBase,
                                   int scope,
                                   java.lang.String filter,
                                   java.lang.String[] attrs,
                                   boolean typesOnly,
                                   LDAPSearchConstraints constraints,
                                   int eventchangetype,
                                   boolean changeonly,
                                   PSearchEventListener alistener)
                            throws LDAPException
This method is use to register for Persistence Search Events by the given Listener. The events generate after registration would include this PSearchEventSource as the EventSource. The valid value for the scope parameter are the following:-

The valid value for eventchangetype parameter are the following:-
Note:For the Persistence Search Events to be generate the LDAP Server should support the Feature.

Parameters:
conn - LDAPConnection to be used for requesting the events from the server.
searchBase - The base distinguished name to search from,i.e the Base for the Persistence search
scope - The scope of the entries to search. The following are the valid options:
  • LdapConnection.SCOPE_BASE - searches only the base DN
  • LdapConnection.SCOPE_ONE - searches only entries under the base DN
  • LdapConnection.SCOPE_SUB - searches the base DN and all entries within its subtree


filter - Search filter specifying the search criteria.
attrs - Names of attributes to retrieve.
typesOnly - If true, returns the names but not the values of the attributes found. If false, returns the names and values for attributes found.
constraints - The constraints specific to the search. The constraints Should not contain a LDAPPersistenceSearchControl.
eventchangetype - Specify the type of Events to receive. The following are the valid options:-
  • EventConstant.LDAP_PSEARCH_ADD: Track events for only additions to the directory.
  • EventConstant.LDAP_PSEARCH_DELETE: Track events for only deletions from the directory.
  • EventConstant.LDAP_PSEARCH_MODIFY: Track events for only modification of entries from the directory.
  • EventConstant.LDAP_PSEARCH_MODDN: Track events for only renaming of entries from the directory.
  • EventConstant.LDAP_PSEARCH_ANY: Track events for all the changes in the directory.
changeonly - if true, Returns only changes to the directory as specified by eventchangetype. else false, it also returns all the current entries which satisfy the search criteria as Search Result.
alistener - The non-null PSearchEventListener for receiving events notification.
Throws:
LDAPException - When the LDAP Server generates an exception.

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000