Class LDAPExtSampler
- java.lang.Object
-
- org.apache.jmeter.testelement.AbstractTestElement
-
- org.apache.jmeter.samplers.AbstractSampler
-
- org.apache.jmeter.protocol.ldap.sampler.LDAPExtSampler
-
- All Implemented Interfaces:
Serializable
,Cloneable
,ConfigMergabilityIndicator
,Searchable
,Sampler
,TestElement
,TestStateListener
public class LDAPExtSampler extends AbstractSampler implements TestStateListener
Ldap Sampler class is main class for the LDAP test. This will control all the test available in the LDAP Test.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADD
static String
ARGUMENTS
static String
ATTRIBS
static String
BASE_ENTRY_DN
static String
BIND
static String
COMPARE
static String
COMPAREDN
static String
COMPAREFILT
static String
CONNTO
static String
COUNTLIM
static String
DELETE
static String
DEREF
static String
LDAPARGUMENTS
static String
MODDDN
static String
MODIFY
static String
NEWDN
static String
PARSEFLAG
static String
PORT
static String
RENAME
static String
RETOBJ
static String
ROOTDN
static String
SBIND
static String
SCOPE
static String
SEARCH
static String
SEARCHBASE
static String
SEARCHFILTER
static String
SECURE
static String
SERVERNAME
static String
TEST
static String
TIMELIM
static String
UNBIND
static String
USERDN
static String
USERPW
-
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
-
-
Constructor Summary
Constructors Constructor Description LDAPExtSampler()
!
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applies(ConfigTestElement configElement)
Does configElement apply to SamplerArguments
getArguments()
Gets the Arguments attribute of the LdapConfig objectString
getAttrs()
Gets the attributes of the LDAPSampler objectString
getBaseEntryDN()
Gets the BaseEntryDN attribute of the LDAPSampler objectString
getConnTimeOut()
String
getCountlim()
Gets the size limit attribute of the LDAPSampler objectlong
getCountlimAsLong()
String
getLabel()
Returns a formatted string label describing this sampler Example output:LDAPArguments
getLDAPArguments()
Gets the LDAPArguments attribute of the LdapConfig objectString
getPort()
Gets the Port attribute of the LDAPSampler objectString
getRootdn()
Gets the Rootdn attribute of the LDAPSampler objectString
getScope()
Gets the search scope attribute of the LDAPSampler objectint
getScopeAsInt()
String
getServername()
Gets the servername attribute of the LDAPSampler objectString
getTest()
Gets the test attribute of the LDAPSampler objectString
getTimelim()
Gets the time limit attribute of the LDAPSampler objectint
getTimelimAsInt()
String
getUserDN()
Gets the username attribute of the LDAP objectString
getUserPw()
Gets the password attribute of the LDAP objectboolean
isDeref()
Gets the deref attribute of the LDAPSampler objectboolean
isParseFlag()
boolean
isRetobj()
Gets the return objects attribute of the LDAPSampler objectboolean
isSecure()
SampleResult
sample(Entry e)
!void
setArguments(Arguments value)
Sets the Arguments attribute of the LdapConfig object This will collect values from the table for user defined test casevoid
setAttrs(String newAttrs)
Sets the attributes of the LdapConfig objectvoid
setBaseEntryDN(String newbaseentry)
Sets the Base Entry DN attribute of the LDAPSampler objectvoid
setConnTimeOut(String connto)
void
setCountlim(String newClim)
Sets the size limit attribute of the LDAPSampler objectvoid
setDeref(String newDref)
Sets the deref attribute of the LDAPSampler objectvoid
setLDAPArguments(LDAPArguments value)
Sets the Arguments attribute of the LdapConfig object This will collect values from the table for user defined test casevoid
setParseFlag(String parseFlag)
void
setPort(String port)
Sets the Port attribute of the ServerConfig objectvoid
setRetobj(String newRobj)
Sets the return objects attribute of the LDAPSampler objectvoid
setRootdn(String newRootdn)
Sets the Rootdn attribute of the LDAPSampler objectvoid
setScope(String newScope)
Sets the search scope attribute of the LDAPSampler objectvoid
setSecure(String sec)
void
setServername(String servername)
Sets the Servername attribute of the ServerConfig objectvoid
setTest(String newTest)
Sets the Test attribute of the LdapConfig objectvoid
setTimelim(String newTlim)
Sets the time limit attribute of the LDAPSampler objectvoid
setUserDN(String newUserDN)
Sets the username attribute of the LDAP objectvoid
setUserPw(String newUserPw)
Sets the password attribute of the LDAP objectvoid
testEnded()
Called once for all threads after the end of a test.void
testEnded(String host)
Called once for all threads after the end of a test.void
testStarted()
Called just before the start of the test from the main engine thread.void
testStarted(String host)
Called just before the start of the test from the main engine thread.-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jmeter.testelement.TestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
-
-
-
Field Detail
-
SERVERNAME
public static final String SERVERNAME
- See Also:
- Constant Field Values
-
PORT
public static final String PORT
- See Also:
- Constant Field Values
-
SECURE
public static final String SECURE
- See Also:
- Constant Field Values
-
ROOTDN
public static final String ROOTDN
- See Also:
- Constant Field Values
-
TEST
public static final String TEST
- See Also:
- Constant Field Values
-
ADD
public static final String ADD
- See Also:
- Constant Field Values
-
MODIFY
public static final String MODIFY
- See Also:
- Constant Field Values
-
BIND
public static final String BIND
- See Also:
- Constant Field Values
-
UNBIND
public static final String UNBIND
- See Also:
- Constant Field Values
-
DELETE
public static final String DELETE
- See Also:
- Constant Field Values
-
SEARCH
public static final String SEARCH
- See Also:
- Constant Field Values
-
SEARCHBASE
public static final String SEARCHBASE
- See Also:
- Constant Field Values
-
SEARCHFILTER
public static final String SEARCHFILTER
- See Also:
- Constant Field Values
-
ARGUMENTS
public static final String ARGUMENTS
- See Also:
- Constant Field Values
-
LDAPARGUMENTS
public static final String LDAPARGUMENTS
- See Also:
- Constant Field Values
-
BASE_ENTRY_DN
public static final String BASE_ENTRY_DN
- See Also:
- Constant Field Values
-
SCOPE
public static final String SCOPE
- See Also:
- Constant Field Values
-
COUNTLIM
public static final String COUNTLIM
- See Also:
- Constant Field Values
-
TIMELIM
public static final String TIMELIM
- See Also:
- Constant Field Values
-
ATTRIBS
public static final String ATTRIBS
- See Also:
- Constant Field Values
-
RETOBJ
public static final String RETOBJ
- See Also:
- Constant Field Values
-
DEREF
public static final String DEREF
- See Also:
- Constant Field Values
-
USERDN
public static final String USERDN
- See Also:
- Constant Field Values
-
USERPW
public static final String USERPW
- See Also:
- Constant Field Values
-
SBIND
public static final String SBIND
- See Also:
- Constant Field Values
-
COMPARE
public static final String COMPARE
- See Also:
- Constant Field Values
-
CONNTO
public static final String CONNTO
- See Also:
- Constant Field Values
-
COMPAREDN
public static final String COMPAREDN
- See Also:
- Constant Field Values
-
COMPAREFILT
public static final String COMPAREFILT
- See Also:
- Constant Field Values
-
PARSEFLAG
public static final String PARSEFLAG
- See Also:
- Constant Field Values
-
RENAME
public static final String RENAME
- See Also:
- Constant Field Values
-
MODDDN
public static final String MODDDN
- See Also:
- Constant Field Values
-
NEWDN
public static final String NEWDN
- See Also:
- Constant Field Values
-
-
Method Detail
-
setConnTimeOut
public void setConnTimeOut(String connto)
-
getConnTimeOut
public String getConnTimeOut()
-
setSecure
public void setSecure(String sec)
-
isSecure
public boolean isSecure()
-
isParseFlag
public boolean isParseFlag()
-
setParseFlag
public void setParseFlag(String parseFlag)
-
getUserDN
public String getUserDN()
Gets the username attribute of the LDAP object- Returns:
- The username
-
setUserDN
public void setUserDN(String newUserDN)
Sets the username attribute of the LDAP object- Parameters:
newUserDN
- distinguished name of the user
-
getUserPw
public String getUserPw()
Gets the password attribute of the LDAP object- Returns:
- The password
-
setUserPw
public void setUserPw(String newUserPw)
Sets the password attribute of the LDAP object- Parameters:
newUserPw
- password of the user
-
setServername
public void setServername(String servername)
Sets the Servername attribute of the ServerConfig object- Parameters:
servername
- The new servername value
-
setPort
public void setPort(String port)
Sets the Port attribute of the ServerConfig object- Parameters:
port
- The new Port value
-
getServername
public String getServername()
Gets the servername attribute of the LDAPSampler object- Returns:
- The Servername value
-
getPort
public String getPort()
Gets the Port attribute of the LDAPSampler object- Returns:
- The Port value
-
setRootdn
public void setRootdn(String newRootdn)
Sets the Rootdn attribute of the LDAPSampler object- Parameters:
newRootdn
- The new rootdn value
-
getRootdn
public String getRootdn()
Gets the Rootdn attribute of the LDAPSampler object- Returns:
- The Rootdn value
-
getScope
public String getScope()
Gets the search scope attribute of the LDAPSampler object- Returns:
- The scope value
-
getScopeAsInt
public int getScopeAsInt()
-
setScope
public void setScope(String newScope)
Sets the search scope attribute of the LDAPSampler object- Parameters:
newScope
- The new scope value
-
getCountlim
public String getCountlim()
Gets the size limit attribute of the LDAPSampler object- Returns:
- The size limit
-
getCountlimAsLong
public long getCountlimAsLong()
-
setCountlim
public void setCountlim(String newClim)
Sets the size limit attribute of the LDAPSampler object- Parameters:
newClim
- The new size limit value
-
getTimelim
public String getTimelim()
Gets the time limit attribute of the LDAPSampler object- Returns:
- The time limit
-
getTimelimAsInt
public int getTimelimAsInt()
-
setTimelim
public void setTimelim(String newTlim)
Sets the time limit attribute of the LDAPSampler object- Parameters:
newTlim
- The new time limit value
-
isRetobj
public boolean isRetobj()
Gets the return objects attribute of the LDAPSampler object- Returns:
- if the object(s) are to be returned
-
setRetobj
public void setRetobj(String newRobj)
Sets the return objects attribute of the LDAPSampler object- Parameters:
newRobj
- whether the objects should be returned
-
isDeref
public boolean isDeref()
Gets the deref attribute of the LDAPSampler object- Returns:
- if dereferencing is required
-
setDeref
public void setDeref(String newDref)
Sets the deref attribute of the LDAPSampler object- Parameters:
newDref
- The new deref value
-
setTest
public void setTest(String newTest)
Sets the Test attribute of the LdapConfig object- Parameters:
newTest
- The new test value(Add,Modify,Delete and search)
-
getTest
public String getTest()
Gets the test attribute of the LDAPSampler object- Returns:
- The test value (Add,Modify,Delete and search)
-
setAttrs
public void setAttrs(String newAttrs)
Sets the attributes of the LdapConfig object- Parameters:
newAttrs
- The new attributes value
-
getAttrs
public String getAttrs()
Gets the attributes of the LDAPSampler object- Returns:
- The attributes
-
setBaseEntryDN
public void setBaseEntryDN(String newbaseentry)
Sets the Base Entry DN attribute of the LDAPSampler object- Parameters:
newbaseentry
- The new Base entry DN value
-
getBaseEntryDN
public String getBaseEntryDN()
Gets the BaseEntryDN attribute of the LDAPSampler object- Returns:
- The Base entry DN value
-
setArguments
public void setArguments(Arguments value)
Sets the Arguments attribute of the LdapConfig object This will collect values from the table for user defined test case- Parameters:
value
- The arguments
-
getArguments
public Arguments getArguments()
Gets the Arguments attribute of the LdapConfig object- Returns:
- The arguments user defined test case
-
setLDAPArguments
public void setLDAPArguments(LDAPArguments value)
Sets the Arguments attribute of the LdapConfig object This will collect values from the table for user defined test case- Parameters:
value
- The arguments
-
getLDAPArguments
public LDAPArguments getLDAPArguments()
Gets the LDAPArguments attribute of the LdapConfig object- Returns:
- The LDAParguments user defined modify test case
-
getLabel
public String getLabel()
Returns a formatted string label describing this sampler Example output:- Returns:
- a formatted string label describing this sampler
-
sample
public SampleResult sample(Entry e)
!ToDo (Method description)
-
testStarted
public void testStarted()
Description copied from interface:TestStateListener
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
- Specified by:
testStarted
in interfaceTestStateListener
- See Also:
StandardJMeterEngine.run()
-
testEnded
public void testEnded()
Description copied from interface:TestStateListener
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
- Specified by:
testEnded
in interfaceTestStateListener
- See Also:
StandardJMeterEngine.stopTest()
-
testStarted
public void testStarted(String host)
Description copied from interface:TestStateListener
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
- Specified by:
testStarted
in interfaceTestStateListener
- Parameters:
host
- name of host- See Also:
StandardJMeterEngine.run()
-
testEnded
public void testEnded(String host)
Description copied from interface:TestStateListener
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
- Specified by:
testEnded
in interfaceTestStateListener
- Parameters:
host
- name of host- See Also:
StandardJMeterEngine.stopTest()
-
applies
public boolean applies(ConfigTestElement configElement)
Description copied from class:AbstractSampler
Does configElement apply to Sampler- Specified by:
applies
in interfaceConfigMergabilityIndicator
- Overrides:
applies
in classAbstractSampler
- Parameters:
configElement
-ConfigTestElement
- Returns:
- boolean
- See Also:
AbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)
-
-