Apache JMeter

org.apache.jmeter.protocol.ldap.sampler
Class LdapExtClient

java.lang.Object
  extended by org.apache.jmeter.protocol.ldap.sampler.LdapExtClient

public class LdapExtClient
extends java.lang.Object

Ldap Client class is main class to create ,modify, search and delete all the LDAP functionality available


Constructor Summary
LdapExtClient()
          Constructor for the LdapClient object
 
Method Summary
 javax.naming.NamingEnumeration compare(javax.naming.directory.DirContext dirContext, java.lang.String filter, java.lang.String entrydn)
          Filter the data in the ldap directory
 javax.naming.directory.DirContext connect(java.lang.String host, java.lang.String port, java.lang.String rootdn, java.lang.String username, java.lang.String password, java.lang.String connTimeOut, boolean secure)
          connect to server
 javax.naming.directory.DirContext createTest(javax.naming.directory.DirContext dirContext, javax.naming.directory.Attributes attributes, java.lang.String string)
          Create the entry in the ldap directory for the given string
 void deleteTest(javax.naming.directory.DirContext dirContext, java.lang.String string)
          Delete the attribute from the ldap directory
 void disconnect(javax.naming.directory.DirContext dirContext)
          disconnect from the server
 void moddnOp(javax.naming.directory.DirContext dirContext, java.lang.String ddn, java.lang.String newdn)
          ModDN the data in the ldap directory for the given search base
 void modifyTest(javax.naming.directory.DirContext dirContext, javax.naming.directory.ModificationItem[] mods, java.lang.String string)
          Modify the attribute in the ldap directory for the given string
 javax.naming.NamingEnumeration searchTest(javax.naming.directory.DirContext dirContext, java.lang.String searchBase, java.lang.String searchFilter, int scope, long countlim, int timelim, java.lang.String[] attrs, boolean retobj, boolean deref)
          Filter the data in the ldap directory for the given search base
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapExtClient

public LdapExtClient()
Constructor for the LdapClient object

Method Detail

connect

public javax.naming.directory.DirContext connect(java.lang.String host,
                                                 java.lang.String port,
                                                 java.lang.String rootdn,
                                                 java.lang.String username,
                                                 java.lang.String password,
                                                 java.lang.String connTimeOut,
                                                 boolean secure)
                                          throws javax.naming.NamingException
connect to server

Parameters:
host - Description of Parameter
username - Description of Parameter
password - Description of Parameter
Throws:
javax.naming.NamingException - Description of Exception

disconnect

public void disconnect(javax.naming.directory.DirContext dirContext)
disconnect from the server


searchTest

public javax.naming.NamingEnumeration searchTest(javax.naming.directory.DirContext dirContext,
                                                 java.lang.String searchBase,
                                                 java.lang.String searchFilter,
                                                 int scope,
                                                 long countlim,
                                                 int timelim,
                                                 java.lang.String[] attrs,
                                                 boolean retobj,
                                                 boolean deref)
                                          throws javax.naming.NamingException
Filter the data in the ldap directory for the given search base

Parameters:
searchBase - base where the search should start
searchFilter - filter filter this value from the base
Throws:
javax.naming.NamingException

compare

public javax.naming.NamingEnumeration compare(javax.naming.directory.DirContext dirContext,
                                              java.lang.String filter,
                                              java.lang.String entrydn)
                                       throws javax.naming.NamingException
Filter the data in the ldap directory

Parameters:
filter - filter this value from the base
Throws:
javax.naming.NamingException

moddnOp

public void moddnOp(javax.naming.directory.DirContext dirContext,
                    java.lang.String ddn,
                    java.lang.String newdn)
             throws javax.naming.NamingException
ModDN the data in the ldap directory for the given search base

Throws:
javax.naming.NamingException

modifyTest

public void modifyTest(javax.naming.directory.DirContext dirContext,
                       javax.naming.directory.ModificationItem[] mods,
                       java.lang.String string)
                throws javax.naming.NamingException
Modify the attribute in the ldap directory for the given string

Parameters:
mods - add all the entry in to the ModificationItem
string - The string (dn) value
Throws:
javax.naming.NamingException

createTest

public javax.naming.directory.DirContext createTest(javax.naming.directory.DirContext dirContext,
                                                    javax.naming.directory.Attributes attributes,
                                                    java.lang.String string)
                                             throws javax.naming.NamingException
Create the entry in the ldap directory for the given string

Parameters:
attributes - add all the attributes and values from the attributes object
string - The string (dn) value
Throws:
javax.naming.NamingException

deleteTest

public void deleteTest(javax.naming.directory.DirContext dirContext,
                       java.lang.String string)
                throws javax.naming.NamingException
Delete the attribute from the ldap directory

Parameters:
string - The string (dn) value
Throws:
javax.naming.NamingException

Apache JMeter

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