Class LDAPSampler
- java.lang.Object
-
- org.apache.jmeter.testelement.AbstractTestElement
-
- org.apache.jmeter.samplers.AbstractSampler
-
- org.apache.jmeter.protocol.ldap.sampler.LDAPSampler
-
- All Implemented Interfaces:
Serializable,Cloneable,ConfigMergabilityIndicator,Searchable,Sampler,TestElement
public class LDAPSampler extends AbstractSampler
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 StringADDstatic StringARGUMENTSstatic StringBASE_ENTRY_DNstatic StringDELETEstatic StringMODIFYstatic StringPORTstatic StringROOTDNstatic StringSEARCHBASEstatic StringSEARCHFILTERstatic StringSERVERNAMEstatic StringTESTstatic StringUSER_DEFINED-
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
-
-
Constructor Summary
Constructors Constructor Description LDAPSampler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplies(ConfigTestElement configElement)Does configElement apply to SamplerArgumentsgetArguments()Gets the Arguments attribute of the LdapConfig object.StringgetBaseEntryDN()Gets the BaseEntryDN attribute of the LDAPSampler object.StringgetLabel()Returns a formatted string label describing this samplerStringgetPassword()Gets the password attribute of the LDAP object.StringgetPort()Gets the Port attribute of the LDAPSampler object.StringgetRootdn()Gets the Rootdn attribute of the LDAPSampler object.StringgetServername()Gets the servername attribute of the LDAPSampler object.StringgetTest()Gets the test attribute of the LDAPSampler object.booleangetUserDefinedTest()Gets the UserDefinedTest attribute of the LDAPSampler object.StringgetUsername()Gets the username attribute of the LDAP object.SampleResultsample(Entry e)Obtains statistics about the given Entry, and packages the information into a SampleResult.voidsetArguments(Arguments value)Sets the Arguments attribute of the LdapConfig object.voidsetBaseEntryDN(String newbaseentry)Sets the Base Entry DN attribute of the LDAPSampler object.voidsetPort(String port)Sets the Port attribute of the ServerConfig object.voidsetRootdn(String newRootdn)Sets the Rootdn attribute of the LDAPSampler object.voidsetServername(String servername)Sets the Servername attribute of the ServerConfig object.voidsetTest(String newTest)Sets the Test attribute of the LdapConfig object.voidsetUserDefinedTest(boolean value)Sets the UserDefinedTest attribute of the LDAPSampler object.-
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
-
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
-
DELETE
public static final String DELETE
- 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
-
USER_DEFINED
public static final String USER_DEFINED
- See Also:
- Constant Field Values
-
ARGUMENTS
public static final String ARGUMENTS
- See Also:
- Constant Field Values
-
BASE_ENTRY_DN
public static final String BASE_ENTRY_DN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUsername
public String getUsername()
Gets the username attribute of the LDAP object.- Returns:
- the username
-
getPassword
public String getPassword()
Gets the password attribute of the LDAP object.- Returns:
- the password
-
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
-
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)
-
setUserDefinedTest
public void setUserDefinedTest(boolean value)
Sets the UserDefinedTest attribute of the LDAPSampler object.- Parameters:
value- the new UserDefinedTest value
-
getUserDefinedTest
public boolean getUserDefinedTest()
Gets the UserDefinedTest attribute of the LDAPSampler object.- Returns:
- the test value true or false. If true it will do the UserDefinedTest else our own inbuild test case.
-
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.
-
getLabel
public String getLabel()
Returns a formatted string label describing this sampler- Returns:
- a formatted string label describing this sampler
-
sample
public SampleResult sample(Entry e)
Description copied from interface:SamplerObtains statistics about the given Entry, and packages the information into a SampleResult.- Parameters:
e- the Entry (TODO seems to be unused)- Returns:
- information about the sample
-
applies
public boolean applies(ConfigTestElement configElement)
Description copied from class:AbstractSamplerDoes configElement apply to Sampler- Specified by:
appliesin interfaceConfigMergabilityIndicator- Overrides:
appliesin classAbstractSampler- Parameters:
configElement-ConfigTestElement- Returns:
- boolean
- See Also:
AbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)
-
-