/** * Returns the latest server controls returned by the server * in the context of this search request, or null * if no server controls were returned. * * @see <a href="../../../../api/com/novell/ldap/LDAPSearchResults.html#getResponseControls()"> com.novell.ldap.LDAPSearchResults.getResponseControls()</a> */ public LDAPControl[] getResponseControls() { com.novell.ldap.LDAPControl[] controls = results.getResponseControls(); if( controls == null) { return null; } LDAPControl[] ietfControls = new LDAPControl[controls.length]; for( int i=0; i < controls.length; i++) { ietfControls[i] = new LDAPControl( controls[i]); } return ietfControls; }
lc.connect( ldapHost, ldapPort ); lc.bind( ldapVersion, loginDN, password.getBytes("UTF8")); LDAPControl ldapCtrl = new LDAPControl("1.3.6.1.4.1.637.81.2.10.10", false, null); LDAPSearchConstraints cons = lc.getSearchConstraints(); cons.setControls( ldapCtrl ); lc.setConstraints(cons); LDAPSearchResults searchResults = lc.search("",LDAPConnection.SCOPE_BASE, "(objectclass=*)", returnedAttributes,attributeOnly , cons); LDAPControl[] controls = searchResults.getResponseControls();
LDAPControl[] controls = getResponseControls(); if ( controls != null ) { for( int i = 0; i < controls.length; i++ ) {