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, org.apache.jmeter.engine.util.ConfigMergabilityIndicator, org.apache.jmeter.gui.Searchable, org.apache.jmeter.samplers.Sampler, org.apache.jmeter.testelement.TestElement, org.apache.jmeter.testelement.TestStateListener

public class LDAPExtSampler extends org.apache.jmeter.samplers.AbstractSampler implements org.apache.jmeter.testelement.TestStateListener
Ldap Sampler class is main class for the LDAP test. This will control all the test available in the LDAP Test.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement

    org.apache.jmeter.testelement.TestElement.Companion
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from interface org.apache.jmeter.testelement.TestElement

    COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    applies(org.apache.jmeter.config.ConfigTestElement configElement)
     
    org.apache.jmeter.config.Arguments
    Gets the Arguments attribute of the LdapConfig object
    Gets the attributes of the LDAPSampler object
    Gets the BaseEntryDN attribute of the LDAPSampler object
     
    Gets the size limit attribute of the LDAPSampler object
    long
     
    Returns a formatted string label describing this sampler Example output:
    Gets the LDAPArguments attribute of the LdapConfig object
    Gets the Port attribute of the LDAPSampler object
    Gets the Rootdn attribute of the LDAPSampler object
    Gets the search scope attribute of the LDAPSampler object
    int
     
    Gets the servername attribute of the LDAPSampler object
    Gets the test attribute of the LDAPSampler object
    Gets the time limit attribute of the LDAPSampler object
    int
     
    Gets the username attribute of the LDAP object
    Gets the password attribute of the LDAP object
    boolean
    Gets the deref attribute of the LDAPSampler object
    boolean
     
    boolean
    Gets the return objects attribute of the LDAPSampler object
    boolean
     
    boolean
     
    org.apache.jmeter.samplers.SampleResult
    sample(org.apache.jmeter.samplers.Entry e)
     
    void
    setArguments(org.apache.jmeter.config.Arguments value)
    Sets the Arguments attribute of the LdapConfig object This will collect values from the table for user defined test case
    void
    setAttrs(String newAttrs)
    Sets the attributes of the LdapConfig object
    void
    setBaseEntryDN(String newbaseentry)
    Sets the Base Entry DN attribute of the LDAPSampler object
    void
     
    void
    Sets the size limit attribute of the LDAPSampler object
    void
    setDeref(String newDref)
    Sets the deref attribute of the LDAPSampler object
    void
    Sets the Arguments attribute of the LdapConfig object This will collect values from the table for user defined test case
    void
    setParseFlag(String parseFlag)
     
    void
    Sets the Port attribute of the ServerConfig object
    void
    setRetobj(String newRobj)
    Sets the return objects attribute of the LDAPSampler object
    void
    setRootdn(String newRootdn)
    Sets the Rootdn attribute of the LDAPSampler object
    void
    setScope(String newScope)
    Sets the search scope attribute of the LDAPSampler object
    void
     
    void
    setServername(String servername)
    Sets the Servername attribute of the ServerConfig object
    void
    setTest(String newTest)
    Sets the Test attribute of the LdapConfig object
    void
    setTimelim(String newTlim)
    Sets the time limit attribute of the LDAPSampler object
    void
     
    void
    setUserDN(String newUserDN)
    Sets the username attribute of the LDAP object
    void
    setUserPw(String newUserPw)
    Sets the password attribute of the LDAP object
    void
     
    void
     
    void
     
    void
     

    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, getPropertyOrNull, 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, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getPropertyOrNull, getProps, getSchema, getString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, removeProperty, set, set, set, set, set, set, set, set, set, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
  • Field Details

  • Constructor Details

    • LDAPExtSampler

      public LDAPExtSampler()
  • Method Details

    • setConnTimeOut

      public void setConnTimeOut(String connto)
    • getConnTimeOut

      public String getConnTimeOut()
    • setSecure

      public void setSecure(String sec)
    • isSecure

      public boolean isSecure()
    • setTrustAll

      public void setTrustAll(String trust)
    • isTrustAll

      public boolean isTrustAll()
    • 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(org.apache.jmeter.config.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 org.apache.jmeter.config.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 org.apache.jmeter.samplers.SampleResult sample(org.apache.jmeter.samplers.Entry e)
      Specified by:
      sample in interface org.apache.jmeter.samplers.Sampler
    • testStarted

      public void testStarted()
      Specified by:
      testStarted in interface org.apache.jmeter.testelement.TestStateListener
    • testEnded

      public void testEnded()
      Specified by:
      testEnded in interface org.apache.jmeter.testelement.TestStateListener
    • testStarted

      public void testStarted(String host)
      Specified by:
      testStarted in interface org.apache.jmeter.testelement.TestStateListener
    • testEnded

      public void testEnded(String host)
      Specified by:
      testEnded in interface org.apache.jmeter.testelement.TestStateListener
    • applies

      public boolean applies(org.apache.jmeter.config.ConfigTestElement configElement)
      Specified by:
      applies in interface org.apache.jmeter.engine.util.ConfigMergabilityIndicator
      Overrides:
      applies in class org.apache.jmeter.samplers.AbstractSampler
      See Also:
      • AbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)