|
|||||||||
| 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.example.RawSiteMinderJobClass
public class RawSiteMinderJobClass
This class defines a SLAMD job that simulates the load that SiteMinder can place on an LDAP directory server. The load that it uses is based on the following (rather inefficient) sequence of events:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static char[] |
ALPHABET
The set of characters that will be used to generate random values for the modifications. |
static java.lang.String |
DEFAULT_ATTR1
The default value for the first attribute to retrieve during the authentication process. |
static java.lang.String |
DEFAULT_ATTR2
The default value for the second attribute to retrieve during the authentication process. |
static java.lang.String |
DEFAULT_ATTR3
The default value for the third attribute to retrieve during the authentication process. |
static java.lang.String[] |
DEFAULT_ATTRS_TO_MODIFY
The default set of attributes to include in the modification. |
static java.lang.String |
DEFAULT_LOG_ID_ATTR
The default attribute used as the login ID. |
static java.lang.String |
STAT_TRACKER_AUTHENTICATION_ATTEMPTS
The name of the stat tracker that will be used to count the number of authentication attempts. |
static java.lang.String |
STAT_TRACKER_AUTHENTICATION_TIME
The name of the stat tracker that will be used to keep track of the time required to perform each authentication. |
static java.lang.String |
STAT_TRACKER_BIND_TIME
The name of the stat tracker that will be used to keep track of the time required to perform each bind. |
static java.lang.String |
STAT_TRACKER_FAIL_REASON
The name of the stat tracker that will be used to categorize the reasons for the failed auths. |
static java.lang.String |
STAT_TRACKER_FAILED_AUTHENTICATIONS
The name of the stat tracker that will be used to count the number of failed authentications. |
static java.lang.String |
STAT_TRACKER_INITIAL_SEARCH_TIME
The name of the stat tracker that will be used to keep track of the time required to perform the initial search (to find the user's entry). |
static java.lang.String |
STAT_TRACKER_MOD_TIME
The name of the stat tracker that will be used to keep track of the time required to perform each modification. |
static java.lang.String |
STAT_TRACKER_NUM_BINDS
The name of the stat tracker that will be used to keep track of the number of bind operations performed. |
static java.lang.String |
STAT_TRACKER_NUM_MODS
The name of the stat tracker that will be used to keep track of the number of modify operations performed. |
static java.lang.String |
STAT_TRACKER_NUM_SEARCH
The name of the stat tracker that will be used to keep track of the number of search operations performed. |
static java.lang.String |
STAT_TRACKER_SUBSEQUENT_SEARCH_TIME
The name of the stat tracker that will be used to keep track of the time required to perform subsequent searches (to retrieve specific attributes from the user's entry). |
static java.lang.String |
STAT_TRACKER_SUCCESSFUL_AUTHENTICATIONS
The name of the stat tracker that will be used to count the number of successful authentications. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
RawSiteMinderJobClass()
Creates a new instance of this job thread. |
|
| Method Summary | |
|---|---|
boolean |
bind(java.lang.String bindDN,
java.lang.String bindPassword,
boolean bindAuthConn)
Sends an LDAPv3 bind request to the directory server and reads the response. |
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 |
equalitySearch(java.lang.String searchBase,
int searchScope,
java.lang.String attributeName,
java.lang.String assertionValue,
java.lang.String[] attrsToReturn)
Sends an LDAP search request with an equality filter to the directory server and reads the response. |
java.lang.String |
getJobCategoryName()
Retrieves the name of the category in which this job class exists. |
java.lang.String |
getJobDescription()
Returns a description of this job that can be seen in the administrative interface. |
java.lang.String |
getJobName()
Returns the user-friendly name that is to be used for this job class in the administrative interface. |
java.lang.String[] |
getLoginInfo()
Retrieves an array containing the login ID and password that should be used to authenticate to the directory. |
ParameterList |
getParameterStubs()
Returns the set of parameters whose value may be specified by the end user. |
java.lang.String |
getRandomString(int length)
Retrieves a string of random characters of the specified length. |
StatTracker[] |
getStatTrackers()
Retrieves the set of stat trackers that are maintained by this job class. |
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)
Performs initialization for this job on each client immediately before each thread is created to actually run the job. |
void |
initializeThread(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval,
ParameterList parameters)
Initializes this job class with the information that it will use when actually running the job. |
boolean |
modify(java.lang.String entryDN,
int modType,
java.lang.String attributeName,
java.lang.String attributeValue)
Sends an LDAP modify request to the directory server and reads the response. |
boolean |
presenceSearch(java.lang.String searchBase,
int searchScope,
java.lang.String attributeName,
java.lang.String[] attrsToReturn)
Sends an LDAP search request with a presence filter to the directory server and reads the response. |
void |
runJob()
Performs the work of actually running the job. |
void |
unbind(boolean authConnection)
Sends an LDAP unbind request to the directory server. |
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. |
| 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 char[] ALPHABET
public static final java.lang.String DEFAULT_ATTR1
public static final java.lang.String DEFAULT_ATTR2
public static final java.lang.String DEFAULT_ATTR3
public static final java.lang.String DEFAULT_LOG_ID_ATTR
public static final java.lang.String STAT_TRACKER_AUTHENTICATION_ATTEMPTS
public static final java.lang.String STAT_TRACKER_AUTHENTICATION_TIME
public static final java.lang.String STAT_TRACKER_BIND_TIME
public static final java.lang.String STAT_TRACKER_FAILED_AUTHENTICATIONS
public static final java.lang.String STAT_TRACKER_FAIL_REASON
public static final java.lang.String STAT_TRACKER_INITIAL_SEARCH_TIME
public static final java.lang.String STAT_TRACKER_MOD_TIME
public static final java.lang.String STAT_TRACKER_NUM_BINDS
public static final java.lang.String STAT_TRACKER_NUM_MODS
public static final java.lang.String STAT_TRACKER_NUM_SEARCH
public static final java.lang.String STAT_TRACKER_SUBSEQUENT_SEARCH_TIME
public static final java.lang.String STAT_TRACKER_SUCCESSFUL_AUTHENTICATIONS
public static final java.lang.String[] DEFAULT_ATTRS_TO_MODIFY
| Constructor Detail |
|---|
public RawSiteMinderJobClass()
| 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 JobClass
public StatTracker[] getStatTrackerStubs(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval)
getStatTrackerStubs in class JobClassclientID - 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 JobClass
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 void initializeClient(java.lang.String clientID,
ParameterList parameters)
throws UnableToRunException
initializeClient in class JobClassclientID - The ID assigned to the client running this job.parameters - The set of parameters provided to this job that can be
used to customize its behavior.
UnableToRunException - If the client initialization could not be
completed successfully and the job is unable
to run.
public void initializeThread(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval,
ParameterList parameters)
throws UnableToRunException
initializeThread in class JobClassclientID - The thread ID for this thread.threadID - The thread ID for this thread.collectionInterval - The collection interval to use for gathering
statistics while processing the job.parameters - The st of parameters that contain the
information used to customize the way this job
is processed.
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 JobClasspublic java.lang.String[] getLoginInfo()
public java.lang.String getRandomString(int length)
length - The number of characters to include in the string.
public boolean bind(java.lang.String bindDN,
java.lang.String bindPassword,
boolean bindAuthConn)
bindDN - The DN of the user binding to the directory.bindPassword - The password for the bind DN.bindAuthConn - Indicates whether the bind will be performed over the
bind connection or the auth connection. Before the
auth connection can be used for other operations, it
must first be bound as a user with sufficient access.
true if the bind was successful, or
false if the bind failed for some reason.
public java.lang.String equalitySearch(java.lang.String searchBase,
int searchScope,
java.lang.String attributeName,
java.lang.String assertionValue,
java.lang.String[] attrsToReturn)
searchBase - The base DN to use for the search.searchScope - The scope to use for the search.attributeName - The name of the attribute to include in the
equality filter.assertionValue - The assertion value to include in the equality
filter.attrsToReturn - The set of attributes that should be requested from
matching entries.
null if no
entries matched. If multiple entries matched the search, then the
DN of the last matching entry returned by the server will be
returned.
public boolean presenceSearch(java.lang.String searchBase,
int searchScope,
java.lang.String attributeName,
java.lang.String[] attrsToReturn)
searchBase - The base DN to use for the search.searchScope - The scope to use for the search.attributeName - The name of the attribute to include in the presence
filter.attrsToReturn - The set of attributes that should be requested from
matching entries.
true if the search was successful and retrieved at
least one entry, or false if it did not.
public boolean modify(java.lang.String entryDN,
int modType,
java.lang.String attributeName,
java.lang.String attributeValue)
entryDN - The DN of the entry to modify.modType - The type of modification to perform (add, delete,
or replace an attribute value).attributeName - The name of the attribute to be modified.attributeValue - The value to use in the modification.
true if the modification was successful, or
false if it was not.public void unbind(boolean authConnection)
authConnection - Indicates whether to send the unbind request over
the unbind connection or the auth connection.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||