com.ibm.di.connector
Class NetscapeChangelogConnector

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by com.ibm.di.connector.LDAPConnector
          extended by com.ibm.di.connector.ChangelogConnector
              extended by com.ibm.di.connector.NetscapeChangelogConnector
All Implemented Interfaces:
ChangelogInterface, ConnectorInterface, VersionInfoInterface, EventListener, NamespaceChangeListener, NamingListener, ObjectChangeListener

public class NetscapeChangelogConnector
extends ChangelogConnector
implements NamespaceChangeListener, 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 Summary
static String ATTRIBUTE_CHANGENUMBER
          Attribute name: "changenumber"
static String ATTRIBUTE_CPR
          Attribute name: "changeNumber"
static String PARAM_BATCH_RETRIEVAL
          Parameter Name: "batchRetrieval"
static String PARAM_DELIVERY_MODE
          Parameter Name: "deliveryMode"
static String PARAM_LDAP_SEARCH_BASE
          Parameter Name: "ldapSearchBase"
static String PARAM_PAGE_SIZE
          Parameter Name: "pageSize"
static String PARAM_SLEEP_INTERVAL
          Parameter Name: "nsSleepInterval"
static String PARAM_START_AT
          Parameter Name: "nsChangenumber"
static String PARAM_STORE_PARAM_NAME
          Parameter Name: "iteratorStateKey"
static String PARAM_TIMEOUT
          Parameter Name: "nsTimeout"
static String PARAM_USE_NOTIFICATIONS
          Parameter Name: "useNotifications"
 
Fields inherited from class com.ibm.di.connector.ChangelogConnector
bothSeparated, defaultMerge, mLdifParser, onlyChanges, PARAM_MERGE_MODE
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Fields inherited from interface com.ibm.di.connector.ChangelogInterface
CONN_PARAM_STATE_KEY_PERSISTENCE, PARAM_MERGE_BOTH_NOT_MERGED, PARAM_MERGE_CHANGELOG_AND_DATA, PARAM_MERGE_ONLY_CHANGED_DATA, PARAM_VAL_AFTER_READ, PARAM_VAL_END_OF_CYCLE, PARAM_VAL_MANUAL, SAVE_STATE_AFTER_READ, SAVE_STATE_END_OF_CYCLE, SAVE_STATE_MANUAL
 
Constructor Summary
NetscapeChangelogConnector()
          Constructs this object and sets it supported mode.
 
Method Summary
 Entry getNextEntry()
          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.
 Object getStateKeyObject()
          Retrieves state key.
 int getStateKeySaveMethod()
          Retrieves the method for storing StateKey.
 String getVersion()
          Version information.
 void initialize(Object aObject)
          Initializes the connector.
 void namingExceptionThrown(NamingExceptionEvent aEvent)
          Callback method for handling NamingEnumerations
 void objectAdded(NamingEvent aEvent)
          Callback method called when an object is added.
 void objectChanged(NamingEvent aEvent)
          Callback method called when an object is changed.
 void objectRemoved(NamingEvent aEvent)
          Callback method called when an object is removed.
 void objectRenamed(NamingEvent aEvent)
          Callback method called when an object is renamed.
 void reconnect(Object o)
          Reconnect to the underlying data source
 void saveStateKey()
          Stores the USN values for the next synchronization.
 void selectEntries()
          Prepares the connector for listening to change notifications.
 void terminate()
          Close the connection to the LDAP server
 
Methods inherited from class com.ibm.di.connector.ChangelogConnector
parseEntry, querySchema
 
Methods inherited from class com.ibm.di.connector.LDAPConnector
addAttributeValue, at2entry, callErrorHookOnAttributeInUseException, compare, deleteEntry, entry2at, findEntry, flagSet, getAttributeSyntax, getCallErrorHook, getCurrentEntry, getLdapContext, getServerControls, getServerInfo, isDeltaSupported, isExceptionFatal, mapAttributeSyntax, modEntry, modEntry, moveEntry, putEntry, queryNamingContexts, queryObjectClassAttributes, rebind, rebind, removeAllAttributeValues, removeAttributeValue, replaceAttributeValue, setADPassword, setsubtreeDeleteSupported, showServerInfo, supportsControl, supportsExtension, supportsPagedResults, supportsPersistantSearch, supportsSorting, supportsVirtualListView
 
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isIOException, logError, logmsg, pushback, queryOperations, queryReply, queryTables, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminateServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer
 

Field Detail

PARAM_LDAP_SEARCH_BASE

public static final String PARAM_LDAP_SEARCH_BASE
Parameter Name: "ldapSearchBase"

See Also:
Constant Field Values

PARAM_STORE_PARAM_NAME

public static final String PARAM_STORE_PARAM_NAME
Parameter Name: "iteratorStateKey"

See Also:
Constant Field Values

PARAM_START_AT

public static final String PARAM_START_AT
Parameter Name: "nsChangenumber"

See Also:
Constant Field Values

PARAM_SLEEP_INTERVAL

public static final String PARAM_SLEEP_INTERVAL
Parameter Name: "nsSleepInterval"

See Also:
Constant Field Values

PARAM_TIMEOUT

public static final String PARAM_TIMEOUT
Parameter Name: "nsTimeout"

See Also:
Constant Field Values

PARAM_PAGE_SIZE

public static final String PARAM_PAGE_SIZE
Parameter Name: "pageSize"

See Also:
Constant Field Values

PARAM_USE_NOTIFICATIONS

public static final String PARAM_USE_NOTIFICATIONS
Parameter Name: "useNotifications"

See Also:
Constant Field Values

PARAM_BATCH_RETRIEVAL

public static final String PARAM_BATCH_RETRIEVAL
Parameter Name: "batchRetrieval"

See Also:
Constant Field Values

PARAM_DELIVERY_MODE

public static final String PARAM_DELIVERY_MODE
Parameter Name: "deliveryMode"

See Also:
Constant Field Values

ATTRIBUTE_CPR

public static final String ATTRIBUTE_CPR
Attribute name: "changeNumber"

See Also:
Constant Field Values

ATTRIBUTE_CHANGENUMBER

public static final 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(Object aObject)
                throws 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:
Exception - if an error occurs.

selectEntries

public void selectEntries()
                   throws Exception
Prepares the connector for listening to change notifications.

Specified by:
selectEntries in interface ConnectorInterface
Overrides:
selectEntries in class LDAPConnector
Throws:
Exception - if an error occurs.

getNextEntry

public Entry getNextEntry()
                   throws 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:
Exception - if an error occurs.
See Also:
ConnectorInterface.selectEntries()

getStateKeySaveMethod

public int getStateKeySaveMethod()
                          throws Exception
Retrieves the method for storing StateKey.

Specified by:
getStateKeySaveMethod in interface ChangelogInterface
Returns:
the identifier of the method used for storing the StateKey in the TDI Store.
Throws:
Exception - - never
See Also:
ChangelogInterface.SAVE_STATE_AFTER_READ, ChangelogInterface.SAVE_STATE_END_OF_CYCLE, ChangelogInterface.SAVE_STATE_MANUAL

saveStateKey

public void saveStateKey()
                  throws 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:
Exception - - never

getStateKeyObject

public Object getStateKeyObject()
                         throws Exception
Retrieves state key.

Specified by:
getStateKeyObject in interface ChangelogInterface
Returns:
the change number wrapped as a Long object.
Throws:
Exception - - never

terminate

public void terminate()
Close the connection to the LDAP server

Specified by:
terminate in interface ConnectorInterface
Overrides:
terminate in class LDAPConnector

objectAdded

public void objectAdded(NamingEvent aEvent)
Callback method called when an object is added.

Specified by:
objectAdded in interface NamespaceChangeListener
Parameters:
aEvent - the event transport object.

objectRemoved

public void objectRemoved(NamingEvent aEvent)
Callback method called when an object is removed.

Specified by:
objectRemoved in interface NamespaceChangeListener
Parameters:
aEvent - the event transport object.

objectRenamed

public void objectRenamed(NamingEvent aEvent)
Callback method called when an object is renamed.

Specified by:
objectRenamed in interface NamespaceChangeListener
Parameters:
aEvent - the event transport object.

objectChanged

public void objectChanged(NamingEvent aEvent)
Callback method called when an object is changed.

Specified by:
objectChanged in interface ObjectChangeListener
Parameters:
aEvent - the event transport object.

namingExceptionThrown

public void namingExceptionThrown(NamingExceptionEvent aEvent)
Callback method for handling NamingEnumerations

Specified by:
namingExceptionThrown in interface NamingListener
Parameters:
aEvent - the naming exception event object

getVersion

public String getVersion()
Version information.

Specified by:
getVersion in interface VersionInfoInterface
Overrides:
getVersion in class ChangelogConnector
Returns:
the version information.

reconnect

public void reconnect(Object o)
               throws Exception
Reconnect to the underlying data source

Specified by:
reconnect in interface ConnectorInterface
Overrides:
reconnect in class Connector
Parameters:
o - User provided parameter, which is sent to initialize()
Throws:
Exception - if an error occurs.
See Also:
ConnectorInterface.initialize(Object)