|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.sun.slamd.job.JobClass
com.sun.slamd.isw.ISWLatencyCheckJobClass
com.sun.slamd.isw.DSToADTemplateBasedAddRateWithLatencyJobClass
public class DSToADTemplateBasedAddRateWithLatencyJobClass
This class implements a SLAMD job that is intended for use in performing adds against a Sun ONE Directory and then monitoring the length of time required for them to appear in Active Directory after being processed through Identity Synchronization for Windows. The entries created will be based on a template provided by the end user.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static char[] |
ALPHA_CHARS
The set of characters that should be included in alphabetic values. |
static char[] |
ALPHANUMERIC_CHARS
The set of characters that should be included in alphanumeric values. |
static char[] |
BASE64_CHARS
The set of characters that should be included in base64 values. |
static java.lang.String[] |
DEFAULT_TEMPLATE_LINES
The text of the template that will be used by default. |
static char[] |
HEX_CHARS
The set of characters that should be included in hexadecimal values. |
static java.lang.String[] |
MONTH_NAMES
The set of months that will be used if the name of a month is required. |
static char[] |
NUMERIC_CHARS
The set of characters that should be included in numeric values. |
static java.lang.String |
STAT_TRACKER_ADD_COUNT
The display name for the stat tracker that will be used to track the number of adds performed. |
static java.lang.String |
STAT_TRACKER_ADD_TIME
The display name for the stat tracker that will be used to track the time required to perform each add. |
static java.lang.String |
STAT_TRACKER_RESULT_CODES
The display name for the stat tracker that will be used to track the result codes from the LDAP operations. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DSToADTemplateBasedAddRateWithLatencyJobClass()
The default constructor used to create a new instance of the add thread. |
|
| Method Summary | |
|---|---|
netscape.ldap.LDAPEntry |
createEntry()
Creates a randomly-generated LDAP entry to be added to the directory. |
void |
destroy()
Attempts to force this thread to exit by closing the connection to the directory server and setting it to null. |
java.lang.String |
generateGUID()
Generates a globally-unique identifier. |
java.lang.String |
generateRandomValue(char[] charSet,
int length)
Retrieves a string containing the specified number of randomly-chosen characters. |
java.lang.String |
getJobCategoryName()
Retrieves the name of the category in which this job class exists. |
java.lang.String |
getJobDescription()
Retrieves a description of the job performed by this job thread. |
java.lang.String |
getJobName()
Retrieves the name of the job performed by this job thread. |
ParameterList |
getParameterStubs()
Retrieve a parameter list that can be used to determine all of the customizable options that are available for this job. |
StatTracker[] |
getStatTrackers()
Retrieves the stat trackers that are maintained for this job thread. |
StatTracker[] |
getStatTrackerStubs(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval)
Retrieves the set of stat trackers that will be maintained by this job class. |
void |
initializeClient(java.lang.String clientID,
ParameterList parameters)
Initializes all of the instance variables that correspond to job parameters. |
void |
initializeThread(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval,
ParameterList parameters)
Initializes this job thread to be used to actually run the job on the client. |
java.lang.String |
processValue(java.lang.String value,
netscape.ldap.LDAPAttributeSet attributeSet,
int entryNumber,
int entryInSequence)
Generates the appropriate value from the given line in the template. |
boolean |
providesParameterTest()
Indicates whether this job class implements logic that makes it possible to test the validity of job parameters before scheduling the job for execution (e.g., to see if the server is reachable using the information provided). |
void |
runJob()
Perform the work of this job thread by establishing the connection(s) to the Sun ONE Directory and issuing all the appropriate adds. |
boolean |
testJobParameters(ParameterList parameters,
java.util.ArrayList outputMessages)
Provides a means of testing the provided job parameters to determine whether they are valid (e.g., to see if the server is reachable) before scheduling the job for execution. |
void |
validateJobInfo(int numClients,
int threadsPerClient,
int threadStartupDelay,
java.util.Date startTime,
java.util.Date stopTime,
int duration,
int collectionInterval,
ParameterList parameters)
Provides a means of validating the information used to schedule the job, including the scheduling information and list of parameters. |
void |
validateTemplate()
Parses the provided template and ensures that it is acceptable for use in creating entries. |
| Methods inherited from class com.sun.slamd.isw.ISWLatencyCheckJobClass |
|---|
getADConnection, getDSConnection |
| 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 |
|---|
public static final java.lang.String STAT_TRACKER_ADD_TIME
public static final java.lang.String STAT_TRACKER_ADD_COUNT
public static final java.lang.String STAT_TRACKER_RESULT_CODES
public static final char[] NUMERIC_CHARS
public static final char[] ALPHA_CHARS
public static final char[] ALPHANUMERIC_CHARS
public static final char[] HEX_CHARS
public static final char[] BASE64_CHARS
public static final java.lang.String[] MONTH_NAMES
public static final java.lang.String[] DEFAULT_TEMPLATE_LINES
| Constructor Detail |
|---|
public DSToADTemplateBasedAddRateWithLatencyJobClass()
initialize
method.
| Method Detail |
|---|
public java.lang.String getJobName()
getJobName in class JobClasspublic java.lang.String getJobDescription()
getJobDescription in class JobClasspublic java.lang.String getJobCategoryName()
getJobCategoryName in class JobClasspublic ParameterList getParameterStubs()
getParameterStubs in class ISWLatencyCheckJobClass
public StatTracker[] getStatTrackerStubs(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval)
getStatTrackerStubs in class ISWLatencyCheckJobClassclientID - 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.
public StatTracker[] getStatTrackers()
getStatTrackers in class ISWLatencyCheckJobClass
public void validateJobInfo(int numClients,
int threadsPerClient,
int threadStartupDelay,
java.util.Date startTime,
java.util.Date stopTime,
int duration,
int collectionInterval,
ParameterList parameters)
throws InvalidValueException
validateJobInfo in class JobClassnumClients - The number of clients that should be used to
run the job.threadsPerClient - The number of threads that should be created on
each client to run the job.threadStartupDelay - The delay in milliseconds that should be used
when starting the client threads.startTime - The time that the job should start running.stopTime - The time that the job should stop running.duration - The maximum length of time in seconds that the
job should be allowed to run.collectionInterval - The collection interval that should be used
when gathering statistics for the job.parameters - The set of parameters provided to this job that
can be used to customize its behavior.
InvalidValueException - If the provided information is not
appropriate for running this job.public boolean providesParameterTest()
providesParameterTest in class JobClasstrue if this job provides a means of testing the job
parameters, or false if not.
public boolean testJobParameters(ParameterList parameters,
java.util.ArrayList outputMessages)
testJobParameters in class JobClassparameters - The job parameters to be tested.outputMessages - The lines of output that were generated as part of
the testing process. Each line of output should
be added to this list as a separate string, and
empty strings (but not null values)
are allowed to provide separation between
different messages. No formatting should be
provided for these messages, however, since they
may be displayed in either an HTML or plain text
interface.
true if the test completed successfully, or
false if not. Note that even if the test did not
complete successfully, the user will be presented with a warning
but will still be allowed to schedule the job using the provided
parameters. This is necessary because the parameters may still be
valid even if the server couldn't validate them at the time the
job was scheduled (e.g., if the server wasn't running or could not
be reached by the SLAMD server even though it could be by the
clients).
public void initializeClient(java.lang.String clientID,
ParameterList parameters)
throws UnableToRunException
initializeClient in class ISWLatencyCheckJobClassclientID - The client ID for the current client.parameters - The set of parameters that have been defined for this
job.
UnableToRunException - If any part of the initialization fails.
public void initializeThread(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval,
ParameterList parameters)
throws UnableToRunException
initializeThread in class ISWLatencyCheckJobClassclientID - 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.
UnableToRunException - If a problem occurs that prevents the thread
from being able to run properly.public void runJob()
runJob in class JobClasspublic void destroy()
null.
destroy in class JobClass
public void validateTemplate()
throws UnableToRunException
UnableToRunException - If the provided template is not acceptable
for some reason.public netscape.ldap.LDAPEntry createEntry()
public java.lang.String processValue(java.lang.String value,
netscape.ldap.LDAPAttributeSet attributeSet,
int entryNumber,
int entryInSequence)
value - The value to be processed.attributeSet - The attribute set containing the values of the
attributes previously defined.entryNumber - The unique number assigned to the entry being
created.entryInSequence - A counter used to determine how many entries have
been created so far.
public java.lang.String generateRandomValue(char[] charSet,
int length)
charSet - The character set from which to take the characters to use
in the generated value.length - The number of characters to include in the string.
public java.lang.String generateGUID()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||