com.sun.slamd.isw
Class ISWLatencyCheckJobClass

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.slamd.job.JobClass
          extended by com.sun.slamd.isw.ISWLatencyCheckJobClass
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ADToDSAddRateWithLatencyJobClass, ADToDSModRateWithLatencyJobClass, DSToADAddRateWithLatencyJobClass, DSToADModRateWithLatencyJobClass, DSToADTemplateBasedAddRateWithLatencyJobClass, DSToNTAddRateWithLatencyJobClass, DSToNTModRateWithLatencyJobClass, DSToNTTemplateBasedAddRateWithLatencyJobClass, NTToDSAddRateWithLatencyJobClass, NTToDSModRateWithLatencyJobClass

public abstract class ISWLatencyCheckJobClass
extends JobClass

This class defines a framework that should be extended by any job that wants to measure the propagation latency between Active Directory and the Sun ONE Directory (in either direction) as they are synchronized using Identity Synchronization for Windows.

Author:
Neil A. Wilson

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected static java.lang.String adBindDN
          The DN to use to bind to AD.
protected  StringParameter adBindDNParameter
          The parameter that indicates the DN to use when binding to the Active Directory server.
protected static java.lang.String adBindPassword
          The password to use to bind to AD.
protected  PasswordParameter adBindPasswordParameter
          The parameter that indicates the bind password for Active Directory.
protected static java.lang.String adHost
          The address of the AD server.
protected  StringParameter adHostParameter
          The parameter that indicates the address of the Active Directory server.
protected static java.lang.String adMonitorDN
          The DN of the entry to monitor in AD.
protected  StringParameter adMonitorDNParameter
          The parameter that specifies the DN of the entry to be periodically modified in the Active Directory server to measure the propagation latency to the Sun ONE Directory.
protected static int adPollDelay
          The poll delay when polling AD for changes.
protected  IntegerParameter adPollDelayParameter
          The parameter that indicates how frequently we will poll the Active Directory server for changes.
protected static int adPort
          The port to use when communicating with AD.
protected  IntegerParameter adPortParameter
          The parameter that indicates the port number for Active Directory.
static char[] ALPHABET
          The characters that are available for use in the randomly-generated values.
 CategoricalTracker categorizedLatency
          The stat tracker for keeping track of categorized replication latency.
protected static java.lang.String dsBindDN
          The DN to use to bind to the Directory Server.
protected  StringParameter dsBindDNParameter
          The parameter that indicates the DN to use when binding to the Sun ONE Directory Server.
protected static java.lang.String dsBindPassword
          The password to use to bind to the Directory Server.
protected  PasswordParameter dsBindPasswordParameter
          The parameter that indicates the bind password for the Sun ONE Directory.
protected static java.lang.String dsHost
          The address of the Directory Server.
protected  StringParameter dsHostParameter
          The parameter that indicates the address of the Sun ONE Directory Server.
protected static java.lang.String dsMonitorDN
          The DN of the entry to monitor in the Directory Server.
protected  StringParameter dsMonitorDNParameter
          The parameter that specifies the DN of the entry in the Sun ONE Directory server to monitor for changes.
protected static int dsPort
          The port to use when communicating with the Directory Server.
protected  IntegerParameter dsPortParameter
          The parameter that indicates the port number for the Sun ONE Directory.
protected static boolean dsUseSSL
          Indicates whether to use SSL when communicating with the Directory Server.
protected  BooleanParameter dsUseSSLParameter
          The parameter that indicates whether the Sun ONE Directory is using SSL.
protected static int latencyDelay
          The delay in seconds between updates to the poll information.
protected  IntegerParameter latencyDelayParameter
          The parameter that indicates the delay between latency checks.
protected static java.lang.String latencyModAttr
          The name of the attribute to be updated.
protected static java.lang.String latencyModAttrNT
          The name of the attribute to update in NT.
protected  StringParameter latencyModAttrNTParameter
          The parameter that specifies the name of the attribute in the directory server that maps to the comment attribute in NT user accounts.
protected  StringParameter latencyModAttrParameter
          The parameter that specifies the name of the attribute to modify when performing latency checks.
 java.lang.Object latencyMutex
          A mutex used for notification between threads.
 TimeTracker latencyTimer
          The stat tracker to use to measure replication latency.
protected static java.lang.String ntMonitorUser
          The name of the user to monitor on NT.
protected  StringParameter ntMonitorUserParameter
          The parameter that specifies the username of the account in the Windows NT domain to monitor for changes.
protected static int ntPollDelay
          The delay in seconds between polls on NT.
protected  IntegerParameter ntPollDelayParameter
          The parameter that indicates how frequently we will poll the Windows NT domain for changes.
protected  PlaceholderParameter placeholder
          The placeholder parameter used as a spacer in the admin interface.
static java.lang.String STAT_TRACKER_CATEGORIZED_LATENCY
          The display name for the stat tracker that will be used to categorize the propagation latencies.
static java.lang.String STAT_TRACKER_PROPAGATION_LATENCY
          The display name for the stat tracker that will be used to track the propagation latency.
static int SYNC_DIRECTION_AD_TO_DS
          The sync direction that indicates that changes will be made in Active Directory and flowed to the Sun ONE Directory.
static int SYNC_DIRECTION_DS_TO_AD
          The sync direction that indicates that changes will be made in the Sun ONE Directory and flowed to Active Directory.
static int SYNC_DIRECTION_DS_TO_NT
          The sync direction that indicates that changes will be made in the Sun ONE Directory and flowed to the Windows NT domain.
static int SYNC_DIRECTION_NT_TO_DS
          The sync direction that indicates that changes will be made in the Windows NT domain and flowed to the Sun ONE Directory.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected ISWLatencyCheckJobClass(int syncDirection)
          Creates a new instance of this latency check job class using the specified sync direction.
 
Method Summary
protected  netscape.ldap.LDAPConnection getADConnection()
          Retrieves a connection to the Active Directory server based on the provided connection parameters.
protected  netscape.ldap.LDAPConnection getDSConnection()
          Retrieves a connection to the Sun ONE Directory server based on the provided connection parameters.
 ParameterList getParameterStubs()
          Retrieves the set of parameters that are applicable to jobs that measure Identity Synchronization for Windows propagation latency between Active Directory and the Sun ONE Directory.
 StatTracker[] getStatTrackers()
          Retrieves the stat trackers that are maintained for jobs measuring propagation latency in an Identity Synchronization for Windows environment.
 StatTracker[] getStatTrackerStubs(java.lang.String clientID, java.lang.String threadID, int collectionInterval)
          Retrieves the set of stat trackers that will be maintained for jobs that measure Identity Synchronization for Windows propagation latency between Active Directory and the Sun ONE Directory.
 void initializeClient(java.lang.String clientID, ParameterList parameters)
          Initializes all of the instance variables that correspond to parameters used in jobs that measure propagation latency in Identity Synchronization for Windows.
 void initializeThread(java.lang.String clientID, java.lang.String threadID, int collectionInterval, ParameterList parameters)
          Initializes the stat trackers used in measuring the propagation latency between Active Directory and the Sun ONE Directory.
 
Methods inherited from class com.sun.slamd.job.JobClass
destroy, enableRealTimeStats, finalizeClient, finalizeJob, finalizeThread, getActiveThreadCount, getClientID, getClientNumber, getClientSideJob, getClientSideParameterStubs, getCollectionInterval, getJobCategoryName, getJobDescription, getJobID, getJobName, getScheduledDuration, getShouldStopTime, getStatReporter, getThreadID, getThreadNumber, indicateCompletedWithErrors, indicateStoppedDueToError, initializeJob, initializeJobThread, isDeprecated, isRunning, logMessage, overrideCollectionInterval, overrideNumClients, overrideThreadsPerClient, providesParameterTest, run, runJob, setClientNumber, setClientSideJob, setThreadNumber, shouldStop, stackTraceToString, startJob, stopAndWait, stopJob, stopRequested, testJobParameters, validateJobInfo, writeVerbose
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, 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, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SYNC_DIRECTION_AD_TO_DS

public static final int SYNC_DIRECTION_AD_TO_DS
The sync direction that indicates that changes will be made in Active Directory and flowed to the Sun ONE Directory.

See Also:
Constant Field Values

SYNC_DIRECTION_DS_TO_AD

public static final int SYNC_DIRECTION_DS_TO_AD
The sync direction that indicates that changes will be made in the Sun ONE Directory and flowed to Active Directory.

See Also:
Constant Field Values

SYNC_DIRECTION_NT_TO_DS

public static final int SYNC_DIRECTION_NT_TO_DS
The sync direction that indicates that changes will be made in the Windows NT domain and flowed to the Sun ONE Directory.

See Also:
Constant Field Values

SYNC_DIRECTION_DS_TO_NT

public static final int SYNC_DIRECTION_DS_TO_NT
The sync direction that indicates that changes will be made in the Sun ONE Directory and flowed to the Windows NT domain.

See Also:
Constant Field Values

STAT_TRACKER_PROPAGATION_LATENCY

public static final java.lang.String STAT_TRACKER_PROPAGATION_LATENCY
The display name for the stat tracker that will be used to track the propagation latency.

See Also:
Constant Field Values

STAT_TRACKER_CATEGORIZED_LATENCY

public static final java.lang.String STAT_TRACKER_CATEGORIZED_LATENCY
The display name for the stat tracker that will be used to categorize the propagation latencies.

See Also:
Constant Field Values

ALPHABET

public static final char[] ALPHABET
The characters that are available for use in the randomly-generated values.


dsUseSSLParameter

protected BooleanParameter dsUseSSLParameter
The parameter that indicates whether the Sun ONE Directory is using SSL.


adPollDelayParameter

protected IntegerParameter adPollDelayParameter
The parameter that indicates how frequently we will poll the Active Directory server for changes.


adPortParameter

protected IntegerParameter adPortParameter
The parameter that indicates the port number for Active Directory.


dsPortParameter

protected IntegerParameter dsPortParameter
The parameter that indicates the port number for the Sun ONE Directory.


latencyDelayParameter

protected IntegerParameter latencyDelayParameter
The parameter that indicates the delay between latency checks.


ntPollDelayParameter

protected IntegerParameter ntPollDelayParameter
The parameter that indicates how frequently we will poll the Windows NT domain for changes.


adBindPasswordParameter

protected PasswordParameter adBindPasswordParameter
The parameter that indicates the bind password for Active Directory.


dsBindPasswordParameter

protected PasswordParameter dsBindPasswordParameter
The parameter that indicates the bind password for the Sun ONE Directory.


placeholder

protected PlaceholderParameter placeholder
The placeholder parameter used as a spacer in the admin interface.


adBindDNParameter

protected StringParameter adBindDNParameter
The parameter that indicates the DN to use when binding to the Active Directory server.


adHostParameter

protected StringParameter adHostParameter
The parameter that indicates the address of the Active Directory server.


adMonitorDNParameter

protected StringParameter adMonitorDNParameter
The parameter that specifies the DN of the entry to be periodically modified in the Active Directory server to measure the propagation latency to the Sun ONE Directory.


dsBindDNParameter

protected StringParameter dsBindDNParameter
The parameter that indicates the DN to use when binding to the Sun ONE Directory Server.


dsHostParameter

protected StringParameter dsHostParameter
The parameter that indicates the address of the Sun ONE Directory Server.


dsMonitorDNParameter

protected StringParameter dsMonitorDNParameter
The parameter that specifies the DN of the entry in the Sun ONE Directory server to monitor for changes.


latencyModAttrParameter

protected StringParameter latencyModAttrParameter
The parameter that specifies the name of the attribute to modify when performing latency checks.


latencyModAttrNTParameter

protected StringParameter latencyModAttrNTParameter
The parameter that specifies the name of the attribute in the directory server that maps to the comment attribute in NT user accounts.


ntMonitorUserParameter

protected StringParameter ntMonitorUserParameter
The parameter that specifies the username of the account in the Windows NT domain to monitor for changes.


dsUseSSL

protected static boolean dsUseSSL
Indicates whether to use SSL when communicating with the Directory Server.


adPollDelay

protected static int adPollDelay
The poll delay when polling AD for changes.


adPort

protected static int adPort
The port to use when communicating with AD.


dsPort

protected static int dsPort
The port to use when communicating with the Directory Server.


latencyDelay

protected static int latencyDelay
The delay in seconds between updates to the poll information.


ntPollDelay

protected static int ntPollDelay
The delay in seconds between polls on NT.


adBindDN

protected static java.lang.String adBindDN
The DN to use to bind to AD.


adBindPassword

protected static java.lang.String adBindPassword
The password to use to bind to AD.


adHost

protected static java.lang.String adHost
The address of the AD server.


adMonitorDN

protected static java.lang.String adMonitorDN
The DN of the entry to monitor in AD.


dsBindDN

protected static java.lang.String dsBindDN
The DN to use to bind to the Directory Server.


dsBindPassword

protected static java.lang.String dsBindPassword
The password to use to bind to the Directory Server.


dsHost

protected static java.lang.String dsHost
The address of the Directory Server.


dsMonitorDN

protected static java.lang.String dsMonitorDN
The DN of the entry to monitor in the Directory Server.


latencyModAttr

protected static java.lang.String latencyModAttr
The name of the attribute to be updated.


latencyModAttrNT

protected static java.lang.String latencyModAttrNT
The name of the attribute to update in NT.


ntMonitorUser

protected static java.lang.String ntMonitorUser
The name of the user to monitor on NT.


categorizedLatency

public CategoricalTracker categorizedLatency
The stat tracker for keeping track of categorized replication latency.


latencyTimer

public TimeTracker latencyTimer
The stat tracker to use to measure replication latency.


latencyMutex

public java.lang.Object latencyMutex
A mutex used for notification between threads.

Constructor Detail

ISWLatencyCheckJobClass

protected ISWLatencyCheckJobClass(int syncDirection)
Creates a new instance of this latency check job class using the specified sync direction.

Parameters:
syncDirection - The flag indicating the direction in which the synchronization is to occur.
Method Detail

getParameterStubs

public ParameterList getParameterStubs()
Retrieves the set of parameters that are applicable to jobs that measure Identity Synchronization for Windows propagation latency between Active Directory and the Sun ONE Directory. Note that the parameter list returned by this method must be merged with the job-specific parameter list from the subclass.

Specified by:
getParameterStubs in class JobClass
Returns:
The set of parameters that are applicable to jobs that measure ISW propagation latency between Active Directory and the Sun ONE Directory.

getStatTrackerStubs

public StatTracker[] getStatTrackerStubs(java.lang.String clientID,
                                         java.lang.String threadID,
                                         int collectionInterval)
Retrieves the set of stat trackers that will be maintained for jobs that measure Identity Synchronization for Windows propagation latency between Active Directory and the Sun ONE Directory. Note that the stat tracker stubs returned by this method must be merged with the job-specific stat tracker stubs from the subclass.

Specified by:
getStatTrackerStubs in class JobClass
Parameters:
clientID - The client ID that should be used for the returned stat trackers.
threadID - The thread ID that should be used for the returned stat trackers.
collectionInterval - The collection interval that should be used for the returned stat trackers.
Returns:
The set of stat trackers that are maintained for jobs measuring propagation latency in an Identity Synchronization for Windows environment.

getStatTrackers

public StatTracker[] getStatTrackers()
Retrieves the stat trackers that are maintained for jobs measuring propagation latency in an Identity Synchronization for Windows environment. Note that the stat trackers returned by this method must be merged with the job-specific stat trackers from the subclass. Also note that this method will only return a non-empty array for the first client and thread, because that will be the only one to actually collect this data.

Specified by:
getStatTrackers in class JobClass
Returns:
The stat trackers that are maintained for jobs measuring propagation latency in an Identity Synchronization for Windows environment.

initializeClient

public void initializeClient(java.lang.String clientID,
                             ParameterList parameters)
                      throws UnableToRunException
Initializes all of the instance variables that correspond to parameters used in jobs that measure propagation latency in Identity Synchronization for Windows.

Overrides:
initializeClient in class JobClass
Parameters:
clientID - The client ID for the current client.
parameters - The set of parameters that have been defined for this job.
Throws:
UnableToRunException - If any part of the initialization fails.

initializeThread

public void initializeThread(java.lang.String clientID,
                             java.lang.String threadID,
                             int collectionInterval,
                             ParameterList parameters)
                      throws UnableToRunException
Initializes the stat trackers used in measuring the propagation latency between Active Directory and the Sun ONE Directory. Note that this method will not actually do anything for any job thread other than the first thread on the first client, since that is the thread responsible for handling the latency checks.

Specified by:
initializeThread in class JobClass
Parameters:
clientID - The client ID for this job thread.
threadID - The thread ID for this job thread.
collectionInterval - The length of time in seconds to use as the statistics collection interval.
parameters - The set of parameters provided to this job that can be used to customize its behavior.
Throws:
UnableToRunException - If a problem occurs that prevents the thread from being able to run properly.

getADConnection

protected netscape.ldap.LDAPConnection getADConnection()
                                                throws netscape.ldap.LDAPException
Retrieves a connection to the Active Directory server based on the provided connection parameters.

Returns:
A connection to the Active Directory server based on the provided connection parameters.
Throws:
netscape.ldap.LDAPException - If a problem occurs while attempting to establish the connection.

getDSConnection

protected netscape.ldap.LDAPConnection getDSConnection()
                                                throws netscape.ldap.LDAPException
Retrieves a connection to the Sun ONE Directory server based on the provided connection parameters.

Returns:
A connection to the Sun ONE Directory server based on the provided connection parameters.
Throws:
netscape.ldap.LDAPException - If a problem occurs while attempting to establish the connection.