com.ibm.di.eventhandler
Class ADLDAPSwitchboard

java.lang.Object
  extended by java.lang.Thread
      extended by com.ibm.di.server.Monitor
          extended by com.ibm.di.eventhandler.Switchboard
              extended by com.ibm.di.eventhandler.ADLDAPSwitchboard
All Implemented Interfaces:
VersionInfoInterface, ActionListener, Runnable, EventListener

public class ADLDAPSwitchboard
extends Switchboard

The class ADLDAPSwitchboard represents the Active Directory EventHandler. This EventHandler reports object changes that occur in Active Directory.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String PARAM_AUTHENTICATION_METHOD
           
static String PARAM_LDAP_PASSWORD
           
static String PARAM_LDAP_SEARCH_BASE
           
static String PARAM_LDAP_URL
           
static String PARAM_LDAP_USE_SSL
           
static String PARAM_LDAP_USER_NAME
           
static String PARAM_PERSISTENT_PARAMETER_NAME
           
static String PARAM_START_AT
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ADLDAPSwitchboard()
          Creates context request controls and search request controls.
 
Method Summary
protected  void addEventProperties(Entry aEntry)
          Adds properties to the event object delivered by the EventHandler.
protected  void blockForNewChanges()
          Performs a search request to Active Directory that blocks until new change happens in the Directory.
 void close()
          Terminates LDAP resources.
 Entry getUsnValues()
          Returns an Entry object containing the current USN synchronization values.
 String getVersion()
          Returns version information.
protected  void initialize()
          Initializes the EventHandler's Directory Context and the AD Changelog Connector used for retrieving changed objects.
 ConnectorInterface loadConnector(String aConnType)
          Instantiates a Connector given its IBM Tivoli Directory Integrator name.
protected  void processUnhandledChanges()
          Retrieves from Active Directory all "newly changed" objects - these are all the changes not reported so far by the EventHandler.
 void run()
          Cycles consecutively through the following operations Reads and reports all unhandled changes.
 void setUsnValues(Entry aUsnEntry)
          Sets the current USN synchronization values to the values specified in the "aUsnEntry" parameter.
 
Methods inherited from class com.ibm.di.eventhandler.Switchboard
actionPerformed, addEventListener, debug, debugBreak, debugMsg, dispatchEvent, dump, dumpEntry, dumpProperties, enableDebug, exitProcess, exitProcess, exitRequested, fireEvent, getConfiguration, getDebug, getDebugger, getEventHandlerListener, getExitMessage, getExitRequested, getInterceptor, getLog, getLogCategory, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParam, getParent, getProperty, getRecording, getScriptEngine, getServer, getStats, getTaskName, logmsg, logmsg, removeEventHandlerListener, removeEventListener, setConfiguration, setDebug, setDebugger, setEventHandlerListener, setExitMessage, setExitRequested, setInterceptor, setLog, setLogCategory, setParam, setParent, setProperty, setRecording, start
 
Methods inherited from class com.ibm.di.server.Monitor
addActionListener, addThread, allThreadsStopped, fireListener, removeActionListener, removeThread, runningALs, runningEHs, setMonitorMessage, threadStarted, threadStopped
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAM_LDAP_URL

public static final String PARAM_LDAP_URL
See Also:
Constant Field Values

PARAM_LDAP_USER_NAME

public static final String PARAM_LDAP_USER_NAME
See Also:
Constant Field Values

PARAM_LDAP_PASSWORD

public static final String PARAM_LDAP_PASSWORD
See Also:
Constant Field Values

PARAM_AUTHENTICATION_METHOD

public static final String PARAM_AUTHENTICATION_METHOD
See Also:
Constant Field Values

PARAM_LDAP_USE_SSL

public static final String PARAM_LDAP_USE_SSL
See Also:
Constant Field Values

PARAM_LDAP_SEARCH_BASE

public static final String PARAM_LDAP_SEARCH_BASE
See Also:
Constant Field Values

PARAM_PERSISTENT_PARAMETER_NAME

public static final String PARAM_PERSISTENT_PARAMETER_NAME
See Also:
Constant Field Values

PARAM_START_AT

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

ADLDAPSwitchboard

public ADLDAPSwitchboard()
Creates context request controls and search request controls.

Method Detail

initialize

protected void initialize()
                   throws Exception
Initializes the EventHandler's Directory Context and the AD Changelog Connector used for retrieving changed objects.

Throws:
Exception - If an error occurs during the initialization.

run

public void run()
Cycles consecutively through the following operations

Specified by:
run in interface Runnable
Overrides:
run in class Thread

processUnhandledChanges

protected void processUnhandledChanges()
                                throws Exception
Retrieves from Active Directory all "newly changed" objects - these are all the changes not reported so far by the EventHandler.

Throws:
Exception - If an error occurs while retrieving changed objects.

blockForNewChanges

protected void blockForNewChanges()
                           throws NamingException
Performs a search request to Active Directory that blocks until new change happens in the Directory.

Throws:
NamingException - If an error occurs while executing the search operation.

close

public void close()
Terminates LDAP resources.

Overrides:
close in class Switchboard

addEventProperties

protected void addEventProperties(Entry aEntry)
Adds properties to the event object delivered by the EventHandler.

Parameters:
aEntry - The event object to add properties to.

loadConnector

public ConnectorInterface loadConnector(String aConnType)
                                 throws Exception
Instantiates a Connector given its IBM Tivoli Directory Integrator name.

Throws:
Exception

getUsnValues

public Entry getUsnValues()
Returns an Entry object containing the current USN synchronization values.


setUsnValues

public void setUsnValues(Entry aUsnEntry)
                  throws Exception
Sets the current USN synchronization values to the values specified in the "aUsnEntry" parameter.

Throws:
Exception - If the given Entry object does not contain the neccessary USN values.

getVersion

public String getVersion()
Returns version information.

Returns:
The EventHandler's version string representation.