O'Reilly logo

LDAP Programming with Java™ by Tony Dahbura, Rob Weltman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A View into Options

If you want to set a default option for a connection object, use the setOption method of LDAP-Connection. Once the option has been set, any operations with this connection will use this option, unless you specifically override the option by supplying a constraints object when invoking the operation. The setOption method takes an integer argument to indicate which option is being set, and an Object argument for the value. The constant integer values for options are defined in LDAPConnection. Settings that are not Object arguments must be wrapped in an Object when calling setOption. For example, to set the maximum number of search results to return on any operation, you can use the following code:

 ldc.setOption( ldc.SIZELIMIT, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required