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.NetscapeChangelogConnector
All Implemented Interfaces:
ChangelogInterface, ConnectorInterface, CheckpointRestartInterface, VersionInfoInterface, EventListener, NamespaceChangeListener, NamingListener, ObjectChangeListener

public class NetscapeChangelogConnector
extends LDAPConnector
implements NamespaceChangeListener, ObjectChangeListener, CheckpointRestartInterface, ConnectorInterface, ChangelogInterface


Field Summary
static String ATTRIBUTE_CHANGENUMBER
           
static String ATTRIBUTE_CPR
           
static String PARAM_BATCH_RETRIEVAL
           
static String PARAM_DELIVERY_MODE
           
static String PARAM_LDAP_SEARCH_BASE
           
static String PARAM_PAGE_SIZE
           
static String PARAM_SLEEP_INTERVAL
           
static String PARAM_START_AT
           
static String PARAM_STORE_PARAM_NAME
           
static String PARAM_TIMEOUT
           
static String PARAM_USE_NOTIFICATIONS
           
 
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.server.CheckpointRestartInterface
RESTART_AFTER, RESTART_BEFORE, RESTART_IN
 
Fields inherited from interface com.ibm.di.connector.ChangelogInterface
CONN_PARAM_STATE_KEY_PERSISTENCE, 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()
           
 
Method Summary
 Entry getCheckpointInformation()
          Returns the state information for the connector.
 Entry getNextEntry()
          Get the next entry that was retrieved by selectEntries().
 Object getStateKeyObject()
           
 int getStateKeySaveMethod()
           
 String getVersion()
          Return version information
 void initialize(Object aObject)
          Initialize the Connector, connect to the LDAP Server
 boolean isCheckpointRestartEnabled(int mode)
          Components that support checkpoint/restart for a specific mode must return TRUE from this method.
 void namingExceptionThrown(NamingExceptionEvent aEvent)
           
 void objectAdded(NamingEvent aEvent)
           
 void objectChanged(NamingEvent aEvent)
           
 void objectRemoved(NamingEvent aEvent)
           
 void objectRenamed(NamingEvent aEvent)
           
 void prepareForRestart(ALState state, Entry restartInfo, int restartPoint)
          Notifies the connector of a restart situation.
 void saveStateKey()
           
 void selectEntries()
          Prepare the Connector for sequential read.
 void terminate()
          Close the connection to the LDAP server
 
Methods inherited from class com.ibm.di.connector.LDAPConnector
addAttributeValue, at2entry, compare, deleteEntry, entry2at, findEntry, flagSet, getAttributeSyntax, getCurrentEntry, getLdapContext, getServerControls, getServerInfo, isDeltaSupported, isExceptionFatal, mapAttributeSyntax, modEntry, modEntry, moveEntry, putEntry, queryNamingContexts, queryObjectClassAttributes, querySchema, rebind, rebind, removeAllAttributeValues, removeAttributeValue, replaceAttributeValue, setADPassword, 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, hasConfigValue, hasParser, initParser, isIOException, logmsg, pushback, queryOperations, queryReply, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, 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, reconnect, 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
See Also:
Constant Field Values

PARAM_STORE_PARAM_NAME

public static final String PARAM_STORE_PARAM_NAME
See Also:
Constant Field Values

PARAM_START_AT

public static final String PARAM_START_AT
See Also:
Constant Field Values

PARAM_SLEEP_INTERVAL

public static final String PARAM_SLEEP_INTERVAL
See Also:
Constant Field Values

PARAM_TIMEOUT

public static final String PARAM_TIMEOUT
See Also:
Constant Field Values

PARAM_PAGE_SIZE

public static final String PARAM_PAGE_SIZE
See Also:
Constant Field Values

PARAM_USE_NOTIFICATIONS

public static final String PARAM_USE_NOTIFICATIONS
See Also:
Constant Field Values

PARAM_BATCH_RETRIEVAL

public static final String PARAM_BATCH_RETRIEVAL
See Also:
Constant Field Values

PARAM_DELIVERY_MODE

public static final String PARAM_DELIVERY_MODE
See Also:
Constant Field Values

ATTRIBUTE_CPR

public static final String ATTRIBUTE_CPR
See Also:
Constant Field Values

ATTRIBUTE_CHANGENUMBER

public static final String ATTRIBUTE_CHANGENUMBER
See Also:
Constant Field Values
Constructor Detail

NetscapeChangelogConnector

public NetscapeChangelogConnector()
Method Detail

initialize

public void initialize(Object aObject)
                throws Exception
Description copied from class: LDAPConnector
Initialize the Connector, connect to the LDAP Server

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class LDAPConnector
Parameters:
aObject - An Object sent to the initialize method, ignored.
Throws:
Exception - Any Exception by the underlying methods to connect to the LDAP Server

selectEntries

public void selectEntries()
                   throws Exception
Description copied from class: LDAPConnector
Prepare the Connector for sequential read. Begin retrieving records matching the Search Base

Specified by:
selectEntries in interface ConnectorInterface
Overrides:
selectEntries in class LDAPConnector
Throws:
Exception - Any Exception by the underlying library

getNextEntry

public Entry getNextEntry()
                   throws Exception
Description copied from class: LDAPConnector
Get the next entry that was retrieved by selectEntries(). The Entry returned is populated with attributes and values from the next entry in the input set. The $dn Attribute of the returned Entry is the distinguished name. If we are using paged-find, possibly retrieve more results.

Specified by:
getNextEntry in interface ConnectorInterface
Overrides:
getNextEntry in class LDAPConnector
Returns:
The next Entry populated with values, or null if nore more Entries
Throws:
Exception - Any Exception thrown by the underlying libraries
See Also:
Connector.selectEntries()

getStateKeySaveMethod

public int getStateKeySaveMethod()
                          throws Exception
Specified by:
getStateKeySaveMethod in interface ChangelogInterface
Throws:
Exception

saveStateKey

public void saveStateKey()
                  throws Exception
Specified by:
saveStateKey in interface ChangelogInterface
Throws:
Exception

getStateKeyObject

public Object getStateKeyObject()
                         throws Exception
Specified by:
getStateKeyObject in interface ChangelogInterface
Throws:
Exception

terminate

public void terminate()
Description copied from class: LDAPConnector
Close the connection to the LDAP server

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

objectAdded

public void objectAdded(NamingEvent aEvent)
Specified by:
objectAdded in interface NamespaceChangeListener

objectRemoved

public void objectRemoved(NamingEvent aEvent)
Specified by:
objectRemoved in interface NamespaceChangeListener

objectRenamed

public void objectRenamed(NamingEvent aEvent)
Specified by:
objectRenamed in interface NamespaceChangeListener

objectChanged

public void objectChanged(NamingEvent aEvent)
Specified by:
objectChanged in interface ObjectChangeListener

namingExceptionThrown

public void namingExceptionThrown(NamingExceptionEvent aEvent)
Specified by:
namingExceptionThrown in interface NamingListener

getVersion

public String getVersion()
Description copied from class: LDAPConnector
Return version information

Specified by:
getVersion in interface VersionInfoInterface
Overrides:
getVersion in class LDAPConnector
Returns:
The version value

isCheckpointRestartEnabled

public boolean isCheckpointRestartEnabled(int mode)
Description copied from interface: CheckpointRestartInterface
Components that support checkpoint/restart for a specific mode must return TRUE from this method. If a restart has no meaning for mode then the connector should still return TRUE.

Specified by:
isCheckpointRestartEnabled in interface CheckpointRestartInterface
Parameters:
mode - The mode the connector runs in
Returns:
true if checkpoint is supported in mode
See Also:
ServerConstants

getCheckpointInformation

public Entry getCheckpointInformation()
                               throws Exception
Description copied from interface: CheckpointRestartInterface
Returns the state information for the connector. If for some reason the connector decidies that a restart is impossible it must throw an exception. The method is called immediatly before any component methods are called. If there is no need to save any state information a null value should be returned. For eventhandlers this method is called by the dispatcher routine.

Specified by:
getCheckpointInformation in interface CheckpointRestartInterface
Returns:
The entry the connector needs to do a restart or null if that is not needed.
Throws:
Exception

prepareForRestart

public void prepareForRestart(ALState state,
                              Entry restartInfo,
                              int restartPoint)
                       throws Exception
Description copied from interface: CheckpointRestartInterface
Notifies the connector of a restart situation. This method is called after the connector has been loaded and before any other method calls are made to the connector. If the connector decides it cannot restart it must throw an exception.

Specified by:
prepareForRestart in interface CheckpointRestartInterface
Parameters:
state - The ALState object for the AssemblyLine
restartInfo - The last entry object returned by the connector in the getCheckpointInformation method
restartPoint - The relative point where restarting is taking place (e.g. RESTART_BEFORE ...)
Throws:
Exception