org.apache.jmeter.protocol.ldap.sampler

## 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:
    java.io.Serializable, java.lang.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 and Description
    --- | ---
    `static java.lang.String` | `ADD`
    `static java.lang.String` | `ARGUMENTS`
    `static java.lang.String` | `ATTRIBS`
    `static java.lang.String` | `BASE_ENTRY_DN`
    `static java.lang.String` | `BIND`
    `static java.lang.String` | `COMPARE`
    `static java.lang.String` | `COMPAREDN`
    `static java.lang.String` | `COMPAREFILT`
    `static java.lang.String` | `CONNTO`
    `static java.lang.String` | `COUNTLIM`
    `static java.lang.String` | `DELETE`
    `static java.lang.String` | `DEREF`
    `static java.lang.String` | `LDAPARGUMENTS`
    `static java.lang.String` | `MODDDN`
    `static java.lang.String` | `MODIFY`
    `static java.lang.String` | `NEWDN`
    `static java.lang.String` | `PARSEFLAG`
    `static java.lang.String` | `PORT`
    `static java.lang.String` | `RENAME`
    `static java.lang.String` | `RETOBJ`
    `static java.lang.String` | `ROOTDN`
    `static java.lang.String` | `SBIND`
    `static java.lang.String` | `SCOPE`
    `static java.lang.String` | `SEARCH`
    `static java.lang.String` | `SEARCHBASE`
    `static java.lang.String` | `SEARCHFILTER`
    `static java.lang.String` | `SECURE`
    `static java.lang.String` | `SERVERNAME`
    `static java.lang.String` | `TEST`
    `static java.lang.String` | `TIMELIM`
    `static java.lang.String` | `UNBIND`
    `static java.lang.String` | `USERDN`
    `static java.lang.String` | `USERPW`

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

      `COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LDAPExtSampler()` !

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `applies(ConfigTestElement configElement)` Does configElement apply to Sampler
    `Arguments` | `getArguments()` Gets the Arguments attribute of the LdapConfig object
    `java.lang.String` | `getAttrs()` Gets the attributes of the LDAPSampler object
    `java.lang.String` | `getBaseEntryDN()` Gets the BaseEntryDN attribute of the LDAPSampler object
    `java.lang.String` | `getConnTimeOut()`
    `java.lang.String` | `getCountlim()` Gets the size limit attribute of the LDAPSampler object
    `long` | `getCountlimAsLong()`
    `java.lang.String` | `getLabel()` Returns a formatted string label describing this sampler Example output:
    `LDAPArguments` | `getLDAPArguments()` Gets the LDAPArguments attribute of the LdapConfig object
    `java.lang.String` | `getPort()` Gets the Port attribute of the LDAPSampler object
    `java.lang.String` | `getRootdn()` Gets the Rootdn attribute of the LDAPSampler object
    `java.lang.String` | `getScope()` Gets the search scope attribute of the LDAPSampler object
    `int` | `getScopeAsInt()`
    `java.lang.String` | `getServername()` Gets the servername attribute of the LDAPSampler object
    `java.lang.String` | `getTest()` Gets the test attribute of the LDAPSampler object
    `java.lang.String` | `getTimelim()` Gets the time limit attribute of the LDAPSampler object
    `int` | `getTimelimAsInt()`
    `java.lang.String` | `getUserDN()` Gets the username attribute of the LDAP object
    `java.lang.String` | `getUserPw()` Gets the password attribute of the LDAP object
    `boolean` | `isDeref()` Gets the deref attribute of the LDAPSampler object
    `boolean` | `isParseFlag()`
    `boolean` | `isRetobj()` Gets the return objects attribute of the LDAPSampler object
    `boolean` | `isSecure()`
    `SampleResult` | `sample(Entry e)` Obtains statistics about the given Entry, and packages the information into a SampleResult.
    `void` | `setArguments(Arguments value)` Sets the Arguments attribute of the LdapConfig object This will collect values from the table for user defined test case
    `void` | `setAttrs(java.lang.String newAttrs)` Sets the attributes of the LdapConfig object
    `void` | `setBaseEntryDN(java.lang.String newbaseentry)` Sets the Base Entry DN attribute of the LDAPSampler object
    `void` | `setConnTimeOut(java.lang.String connto)`
    `void` | `setCountlim(java.lang.String newClim)` Sets the size limit attribute of the LDAPSampler object
    `void` | `setDeref(java.lang.String newDref)` Sets the deref attribute of the LDAPSampler object
    `void` | `setLDAPArguments(LDAPArguments value)` Sets the Arguments attribute of the LdapConfig object This will collect values from the table for user defined test case
    `void` | `setParseFlag(java.lang.String parseFlag)`
    `void` | `setPort(java.lang.String port)` Sets the Port attribute of the ServerConfig object
    `void` | `setRetobj(java.lang.String newRobj)` Sets the return objects attribute of the LDAPSampler object
    `void` | `setRootdn(java.lang.String newRootdn)` Sets the Rootdn attribute of the LDAPSampler object
    `void` | `setScope(java.lang.String newScope)` Sets the search scope attribute of the LDAPSampler object
    `void` | `setSecure(java.lang.String sec)`
    `void` | `setServername(java.lang.String servername)` Sets the Servername attribute of the ServerConfig object
    `void` | `setTest(java.lang.String newTest)` Sets the Test attribute of the LdapConfig object
    `void` | `setTimelim(java.lang.String newTlim)` Sets the time limit attribute of the LDAPSampler object
    `void` | `setUserDN(java.lang.String newUserDN)` Sets the username attribute of the LDAP object
    `void` | `setUserPw(java.lang.String newUserPw)` Sets the password attribute of the LDAP object
    `void` | `testEnded()` Called once for all threads after the end of a test.
    `void` | `testEnded(java.lang.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(java.lang.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, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse`

- - ### Field Detail

    - #### SERVERNAME

          public static final java.lang.String SERVERNAME

      See Also:
        Constant Field Values

    - #### PORT

          public static final java.lang.String PORT

      See Also:
        Constant Field Values

    - #### SECURE

          public static final java.lang.String SECURE

      See Also:
        Constant Field Values

    - #### ROOTDN

          public static final java.lang.String ROOTDN

      See Also:
        Constant Field Values

    - #### TEST

          public static final java.lang.String TEST

      See Also:
        Constant Field Values

    - #### ADD

          public static final java.lang.String ADD

      See Also:
        Constant Field Values

    - #### MODIFY

          public static final java.lang.String MODIFY

      See Also:
        Constant Field Values

    - #### BIND

          public static final java.lang.String BIND

      See Also:
        Constant Field Values

    - #### UNBIND

          public static final java.lang.String UNBIND

      See Also:
        Constant Field Values

    - #### DELETE

          public static final java.lang.String DELETE

      See Also:
        Constant Field Values

    - #### SEARCH

          public static final java.lang.String SEARCH

      See Also:
        Constant Field Values

    - #### SEARCHBASE

          public static final java.lang.String SEARCHBASE

      See Also:
        Constant Field Values

    - #### SEARCHFILTER

          public static final java.lang.String SEARCHFILTER

      See Also:
        Constant Field Values

    - #### ARGUMENTS

          public static final java.lang.String ARGUMENTS

      See Also:
        Constant Field Values

    - #### LDAPARGUMENTS

          public static final java.lang.String LDAPARGUMENTS

      See Also:
        Constant Field Values

    - #### BASE_ENTRY_DN

          public static final java.lang.String BASE_ENTRY_DN

      See Also:
        Constant Field Values

    - #### SCOPE

          public static final java.lang.String SCOPE

      See Also:
        Constant Field Values

    - #### COUNTLIM

          public static final java.lang.String COUNTLIM

      See Also:
        Constant Field Values

    - #### TIMELIM

          public static final java.lang.String TIMELIM

      See Also:
        Constant Field Values

    - #### ATTRIBS

          public static final java.lang.String ATTRIBS

      See Also:
        Constant Field Values

    - #### RETOBJ

          public static final java.lang.String RETOBJ

      See Also:
        Constant Field Values

    - #### DEREF

          public static final java.lang.String DEREF

      See Also:
        Constant Field Values

    - #### USERDN

          public static final java.lang.String USERDN

      See Also:
        Constant Field Values

    - #### USERPW

          public static final java.lang.String USERPW

      See Also:
        Constant Field Values

    - #### SBIND

          public static final java.lang.String SBIND

      See Also:
        Constant Field Values

    - #### COMPARE

          public static final java.lang.String COMPARE

      See Also:
        Constant Field Values

    - #### CONNTO

          public static final java.lang.String CONNTO

      See Also:
        Constant Field Values

    - #### COMPAREDN

          public static final java.lang.String COMPAREDN

      See Also:
        Constant Field Values

    - #### COMPAREFILT

          public static final java.lang.String COMPAREFILT

      See Also:
        Constant Field Values

    - #### PARSEFLAG

          public static final java.lang.String PARSEFLAG

      See Also:
        Constant Field Values

    - #### RENAME

          public static final java.lang.String RENAME

      See Also:
        Constant Field Values

    - #### MODDDN

          public static final java.lang.String MODDDN

      See Also:
        Constant Field Values

    - #### NEWDN

          public static final java.lang.String NEWDN

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LDAPExtSampler

          public LDAPExtSampler()

      !ToDo (Constructor description)

  - ### Method Detail

    - #### setConnTimeOut

          public void setConnTimeOut(java.lang.String connto)

    - #### getConnTimeOut

          public java.lang.String getConnTimeOut()

    - #### setSecure

          public void setSecure(java.lang.String sec)

    - #### isSecure

          public boolean isSecure()

    - #### isParseFlag

          public boolean isParseFlag()

    - #### setParseFlag

          public void setParseFlag(java.lang.String parseFlag)

    - #### getUserDN

          public java.lang.String getUserDN()

      Gets the username attribute of the LDAP object
      Returns:
        The username

    - #### setUserDN

          public void setUserDN(java.lang.String newUserDN)

      Sets the username attribute of the LDAP object
      Parameters:
        `newUserDN` - distinguished name of the user

    - #### getUserPw

          public java.lang.String getUserPw()

      Gets the password attribute of the LDAP object
      Returns:
        The password

    - #### setUserPw

          public void setUserPw(java.lang.String newUserPw)

      Sets the password attribute of the LDAP object
      Parameters:
        `newUserPw` - password of the user

    - #### setServername

          public void setServername(java.lang.String servername)

      Sets the Servername attribute of the ServerConfig object
      Parameters:
        `servername` - The new servername value

    - #### setPort

          public void setPort(java.lang.String port)

      Sets the Port attribute of the ServerConfig object
      Parameters:
        `port` - The new Port value

    - #### getServername

          public java.lang.String getServername()

      Gets the servername attribute of the LDAPSampler object
      Returns:
        The Servername value

    - #### getPort

          public java.lang.String getPort()

      Gets the Port attribute of the LDAPSampler object
      Returns:
        The Port value

    - #### setRootdn

          public void setRootdn(java.lang.String newRootdn)

      Sets the Rootdn attribute of the LDAPSampler object
      Parameters:
        `newRootdn` - The new rootdn value

    - #### getRootdn

          public java.lang.String getRootdn()

      Gets the Rootdn attribute of the LDAPSampler object
      Returns:
        The Rootdn value

    - #### getScope

          public java.lang.String getScope()

      Gets the search scope attribute of the LDAPSampler object
      Returns:
        The scope value

    - #### getScopeAsInt

          public int getScopeAsInt()

    - #### setScope

          public void setScope(java.lang.String newScope)

      Sets the search scope attribute of the LDAPSampler object
      Parameters:
        `newScope` - The new scope value

    - #### getCountlim

          public java.lang.String getCountlim()

      Gets the size limit attribute of the LDAPSampler object
      Returns:
        The size limit

    - #### getCountlimAsLong

          public long getCountlimAsLong()

    - #### setCountlim

          public void setCountlim(java.lang.String newClim)

      Sets the size limit attribute of the LDAPSampler object
      Parameters:
        `newClim` - The new size limit value

    - #### getTimelim

          public java.lang.String getTimelim()

      Gets the time limit attribute of the LDAPSampler object
      Returns:
        The time limit

    - #### getTimelimAsInt

          public int getTimelimAsInt()

    - #### setTimelim

          public void setTimelim(java.lang.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(java.lang.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(java.lang.String newDref)

      Sets the deref attribute of the LDAPSampler object
      Parameters:
        `newDref` - The new deref value

    - #### setTest

          public void setTest(java.lang.String newTest)

      Sets the Test attribute of the LdapConfig object
      Parameters:
        `newTest` - The new test value(Add,Modify,Delete and search)

    - #### getTest

          public java.lang.String getTest()

      Gets the test attribute of the LDAPSampler object
      Returns:
        The test value (Add,Modify,Delete and search)

    - #### setAttrs

          public void setAttrs(java.lang.String newAttrs)

      Sets the attributes of the LdapConfig object
      Parameters:
        `newAttrs` - The new attributes value

    - #### getAttrs

          public java.lang.String getAttrs()

      Gets the attributes of the LDAPSampler object
      Returns:
        The attributes

    - #### setBaseEntryDN

          public void setBaseEntryDN(java.lang.String newbaseentry)

      Sets the Base Entry DN attribute of the LDAPSampler object
      Parameters:
        `newbaseentry` - The new Base entry DN value

    - #### getBaseEntryDN

          public java.lang.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 java.lang.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)

      Description copied from interface: `Sampler`
      Obtains statistics about the given Entry, and packages the information into a SampleResult.
      Specified by:
        `sample` in interface `Sampler`
      Parameters:
        `e` - the Entry (TODO seems to be unused)
      Returns:
        information about the sample

    - #### 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 interface `TestStateListener`
      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 interface `TestStateListener`
      See Also:
        `StandardJMeterEngine.stopTest()`

    - #### testStarted

          public void testStarted(java.lang.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 interface `TestStateListener`
      Parameters:
        `host` - name of host
      See Also:
        `StandardJMeterEngine.run()`

    - #### testEnded

          public void testEnded(java.lang.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 interface `TestStateListener`
      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 interface `ConfigMergabilityIndicator`
      Overrides:
        `applies` in class `AbstractSampler`
      Parameters:
        `configElement` - `ConfigTestElement`
      Returns:
        boolean
      See Also:
        `AbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)`

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.