com.sun.slamd.isw
Class ISWLatencyCheckJobClass

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.sun.slamd.job.JobClass
          extended bycom.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.


Field Summary
protected static java.lang.String adBindDN
           
protected  StringParameter adBindDNParameter
           
protected static java.lang.String adBindPassword
           
protected  PasswordParameter adBindPasswordParameter
           
protected static java.lang.String adHost
           
protected  StringParameter adHostParameter
           
protected static java.lang.String adMonitorDN
           
protected  StringParameter adMonitorDNParameter
           
protected static int adPollDelay
           
protected  IntegerParameter adPollDelayParameter
           
protected static int adPort
           
protected  IntegerParameter adPortParameter
           
static char[] ALPHABET
          The characters that are available for use in the randomly-generated values.
 CategoricalTracker categorizedLatency
           
protected static java.lang.String dsBindDN
           
protected  StringParameter dsBindDNParameter
           
protected static java.lang.String dsBindPassword
           
protected  PasswordParameter dsBindPasswordParameter
           
protected static java.lang.String dsHost
           
protected  StringParameter dsHostParameter
           
protected static java.lang.String dsMonitorDN
           
protected  StringParameter dsMonitorDNParameter
           
protected static int dsPort
           
protected  IntegerParameter dsPortParameter
           
protected static boolean dsUseSSL
           
protected  BooleanParameter dsUseSSLParameter
           
protected static int latencyDelay
           
protected  IntegerParameter latencyDelayParameter
           
protected static java.lang.String latencyModAttr
           
protected static java.lang.String latencyModAttrNT
           
protected  StringParameter latencyModAttrNTParameter
           
protected  StringParameter latencyModAttrParameter
           
 java.lang.Object latencyMutex
           
 TimeTracker latencyTimer
           
protected static java.lang.String ntMonitorUser
           
protected  StringParameter ntMonitorUserParameter
           
protected static int ntPollDelay
           
protected  IntegerParameter ntPollDelayParameter
           
protected  PlaceholderParameter placeholder
           
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, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

adPollDelayParameter

protected IntegerParameter adPollDelayParameter

adPortParameter

protected IntegerParameter adPortParameter

dsPortParameter

protected IntegerParameter dsPortParameter

latencyDelayParameter

protected IntegerParameter latencyDelayParameter

ntPollDelayParameter

protected IntegerParameter ntPollDelayParameter

adBindPasswordParameter

protected PasswordParameter adBindPasswordParameter

dsBindPasswordParameter

protected PasswordParameter dsBindPasswordParameter

placeholder

protected PlaceholderParameter placeholder

adBindDNParameter

protected StringParameter adBindDNParameter

adHostParameter

protected StringParameter adHostParameter

adMonitorDNParameter

protected StringParameter adMonitorDNParameter

dsBindDNParameter

protected StringParameter dsBindDNParameter

dsHostParameter

protected StringParameter dsHostParameter

dsMonitorDNParameter

protected StringParameter dsMonitorDNParameter

latencyModAttrParameter

protected StringParameter latencyModAttrParameter

latencyModAttrNTParameter

protected StringParameter latencyModAttrNTParameter

ntMonitorUserParameter

protected StringParameter ntMonitorUserParameter

dsUseSSL

protected static boolean dsUseSSL

adPollDelay

protected static int adPollDelay

adPort

protected static int adPort

dsPort

protected static int dsPort

latencyDelay

protected static int latencyDelay

ntPollDelay

protected static int ntPollDelay

adBindDN

protected static java.lang.String adBindDN

adBindPassword

protected static java.lang.String adBindPassword

adHost

protected static java.lang.String adHost

adMonitorDN

protected static java.lang.String adMonitorDN

dsBindDN

protected static java.lang.String dsBindDN

dsBindPassword

protected static java.lang.String dsBindPassword

dsHost

protected static java.lang.String dsHost

dsMonitorDN

protected static java.lang.String dsMonitorDN

latencyModAttr

protected static java.lang.String latencyModAttr

latencyModAttrNT

protected static java.lang.String latencyModAttrNT

ntMonitorUser

protected static java.lang.String ntMonitorUser

categorizedLatency

public CategoricalTracker categorizedLatency

latencyTimer

public TimeTracker latencyTimer

latencyMutex

public java.lang.Object latencyMutex
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.