Class NetscapeChangelogConnector

  • All Implemented Interfaces:
    ChangelogInterface, ConnectorInterface, VersionInfoInterface, java.util.EventListener, javax.naming.event.NamespaceChangeListener, javax.naming.event.NamingListener, javax.naming.event.ObjectChangeListener

    public class NetscapeChangelogConnector
    extends ChangelogConnector
    implements javax.naming.event.NamespaceChangeListener, javax.naming.event.ObjectChangeListener, ConnectorInterface, ChangelogInterface
    The NetscapeChangelogConnector is a specialized instance of the LDAP Connector. In earlier versions of iPlanet Directory Server, the change log was accessible through LDAP. Now the changelog is intended for internal use by the server only. If you have applications that must read the changelog, you will need to use the iPlanet Retro Change Log Plug-in for backward compatibility.
    • Field Detail

      • PARAM_LDAP_SEARCH_BASE

        public static final java.lang.String PARAM_LDAP_SEARCH_BASE
        Parameter Name: "ldapSearchBase"
        See Also:
        Constant Field Values
      • PARAM_STORE_PARAM_NAME

        public static final java.lang.String PARAM_STORE_PARAM_NAME
        Parameter Name: "iteratorStateKey"
        See Also:
        Constant Field Values
      • PARAM_START_AT

        public static final java.lang.String PARAM_START_AT
        Parameter Name: "nsChangenumber"
        See Also:
        Constant Field Values
      • PARAM_SLEEP_INTERVAL

        public static final java.lang.String PARAM_SLEEP_INTERVAL
        Parameter Name: "nsSleepInterval"
        See Also:
        Constant Field Values
      • PARAM_TIMEOUT

        public static final java.lang.String PARAM_TIMEOUT
        Parameter Name: "nsTimeout"
        See Also:
        Constant Field Values
      • PARAM_PAGE_SIZE

        public static final java.lang.String PARAM_PAGE_SIZE
        Parameter Name: "pageSize"
        See Also:
        Constant Field Values
      • PARAM_USE_NOTIFICATIONS

        public static final java.lang.String PARAM_USE_NOTIFICATIONS
        Parameter Name: "useNotifications"
        See Also:
        Constant Field Values
      • PARAM_BATCH_RETRIEVAL

        public static final java.lang.String PARAM_BATCH_RETRIEVAL
        Parameter Name: "batchRetrieval"
        See Also:
        Constant Field Values
      • PARAM_DELIVERY_MODE

        public static final java.lang.String PARAM_DELIVERY_MODE
        Parameter Name: "deliveryMode"
        See Also:
        Constant Field Values
      • ATTRIBUTE_CPR

        public static final java.lang.String ATTRIBUTE_CPR
        Attribute name: "changeNumber"
        See Also:
        Constant Field Values
      • ATTRIBUTE_CHANGENUMBER

        public static final java.lang.String ATTRIBUTE_CHANGENUMBER
        Attribute name: "changenumber"
        See Also:
        Constant Field Values
    • Constructor Detail

      • NetscapeChangelogConnector

        public NetscapeChangelogConnector()
        Constructs this object and sets it supported mode.
    • Method Detail

      • initialize

        public void initialize​(java.lang.Object aObject)
                        throws java.lang.Exception
        Initializes the connector. All the configuration properties are considered and applied before a connection is made. After everything is set the connection is established and the connector is registered for receiving change notification.
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class ChangelogConnector
        Parameters:
        aObject - ignored.
        Throws:
        java.lang.Exception - if an error occurs.
      • selectEntries

        public void selectEntries()
                           throws java.lang.Exception
        Prepares the connector for listening to change notifications.
        Specified by:
        selectEntries in interface ConnectorInterface
        Overrides:
        selectEntries in class LDAPConnector
        Throws:
        java.lang.Exception - if an error occurs.
      • getNextEntry

        public Entry getNextEntry()
                           throws java.lang.Exception
        This method will get the next change if the number of changes is smaller than the actual changes, that were done on the Directory Server. If no more changes are available this method will block until notified that a change was done.
        Specified by:
        getNextEntry in interface ConnectorInterface
        Overrides:
        getNextEntry in class LDAPConnector
        Returns:
        the changes as an Entry object
        Throws:
        java.lang.Exception - if an error occurs.
        See Also:
        ConnectorInterface.selectEntries()
      • saveStateKey

        public void saveStateKey()
                          throws java.lang.Exception
        Stores the USN values for the next synchronization. This method will skip the storing of the StateKey if the StateKey save method is set to ChangelogInterface.SAVE_STATE_AFTER_READ
        Specified by:
        saveStateKey in interface ChangelogInterface
        Throws:
        java.lang.Exception - - never
      • getStateKeyObject

        public java.lang.Object getStateKeyObject()
                                           throws java.lang.Exception
        Retrieves state key.
        Specified by:
        getStateKeyObject in interface ChangelogInterface
        Returns:
        the change number wrapped as a Long object.
        Throws:
        java.lang.Exception - - never
      • objectAdded

        public void objectAdded​(javax.naming.event.NamingEvent aEvent)
        Callback method called when an object is added.
        Specified by:
        objectAdded in interface javax.naming.event.NamespaceChangeListener
        Parameters:
        aEvent - the event transport object.
      • objectRemoved

        public void objectRemoved​(javax.naming.event.NamingEvent aEvent)
        Callback method called when an object is removed.
        Specified by:
        objectRemoved in interface javax.naming.event.NamespaceChangeListener
        Parameters:
        aEvent - the event transport object.
      • objectRenamed

        public void objectRenamed​(javax.naming.event.NamingEvent aEvent)
        Callback method called when an object is renamed.
        Specified by:
        objectRenamed in interface javax.naming.event.NamespaceChangeListener
        Parameters:
        aEvent - the event transport object.
      • objectChanged

        public void objectChanged​(javax.naming.event.NamingEvent aEvent)
        Callback method called when an object is changed.
        Specified by:
        objectChanged in interface javax.naming.event.ObjectChangeListener
        Parameters:
        aEvent - the event transport object.
      • namingExceptionThrown

        public void namingExceptionThrown​(javax.naming.event.NamingExceptionEvent aEvent)
        Callback method for handling NamingEnumerations
        Specified by:
        namingExceptionThrown in interface javax.naming.event.NamingListener
        Parameters:
        aEvent - the naming exception event object