Package org.springframework.ldap.core
Interface LdapClient.Builder
- Enclosing interface:
- LdapClient
public static interface LdapClient.Builder
A mutable builder for creating an
LdapClient
.-
Method Summary
Modifier and TypeMethodDescriptionapply
(Consumer<LdapClient.Builder> builderConsumer) Apply the givenConsumer
to this builder instance.build()
Build theLdapClient
instance.clone()
Clone thisLdapClient.Builder
.contextSource
(ContextSource contextSource) Use thisContextSource
defaultSearchControls
(Supplier<SearchControls> searchControlsSupplier) Use thisSupplier
to generate aSearchControls
.ignoreNameNotFoundException
(boolean ignore) Whether to ignore theNameNotFoundException
.ignorePartialResultException
(boolean ignore) Whether to ignore thePartialResultException
.ignoreSizeLimitExceededException
(boolean ignore) Whether to ignore theSizeLimitExceededException
.
-
Method Details
-
contextSource
Use thisContextSource
- Returns:
- the
LdapClient.Builder
for further customizations
-
defaultSearchControls
Use thisSupplier
to generate aSearchControls
. It should generate a newSearchControls
on each call.- Parameters:
searchControlsSupplier
- theSupplier
to use- Returns:
- the
LdapClient.Builder
for further customizations
-
ignorePartialResultException
Whether to ignore thePartialResultException
. Defaults totrue
.- Parameters:
ignore
- whether to ignore thePartialResultException
- Returns:
- the
LdapClient.Builder
for further customizations
-
ignoreNameNotFoundException
Whether to ignore theNameNotFoundException
. Defaults totrue
.- Parameters:
ignore
- whether to ignore theNameNotFoundException
- Returns:
- the
LdapClient.Builder
for further customizations
-
ignoreSizeLimitExceededException
Whether to ignore theSizeLimitExceededException
. Defaults totrue
.- Parameters:
ignore
- whether to ignore theSizeLimitExceededException
- Returns:
- the
LdapClient.Builder
for further customizations
-
apply
Apply the givenConsumer
to this builder instance.This can be useful for applying pre-packaged customizations.
- Parameters:
builderConsumer
- the consumer to apply
-
clone
LdapClient.Builder clone()Clone thisLdapClient.Builder
. -
build
LdapClient build()Build theLdapClient
instance.
-