public class BindConnectionInitializer extends Object implements ConnectionInitializer
Modifier and Type | Field and Description |
---|---|
private RequestControl[] |
bindControls
Bind controls.
|
private Credential |
bindCredential
Credential for the bind DN.
|
private String |
bindDn
DN to bind as before performing operations.
|
private SaslConfig |
bindSaslConfig
Configuration for bind SASL authentication.
|
protected Logger |
logger
Logger for this class.
|
Constructor and Description |
---|
BindConnectionInitializer()
Default constructor.
|
BindConnectionInitializer(String dn,
Credential credential)
Creates a new bind connection initializer.
|
Modifier and Type | Method and Description |
---|---|
RequestControl[] |
getBindControls()
Returns the bind controls.
|
Credential |
getBindCredential()
Returns the credential used with the bind DN.
|
String |
getBindDn()
Returns the bind DN.
|
SaslConfig |
getBindSaslConfig()
Returns the bind sasl config.
|
Response<Void> |
initialize(Connection c)
Initialize the supplied connection.
|
boolean |
isEmpty()
Returns whether this connection initializer contains any configuration data.
|
void |
setBindControls(RequestControl... c)
Sets the bind controls.
|
void |
setBindCredential(Credential credential)
Sets the credential of the bind DN.
|
void |
setBindDn(String dn)
Sets the bind DN to authenticate as before performing operations.
|
void |
setBindSaslConfig(SaslConfig config)
Sets the bind sasl config.
|
String |
toString() |
protected final Logger logger
private String bindDn
private Credential bindCredential
private SaslConfig bindSaslConfig
private RequestControl[] bindControls
public BindConnectionInitializer()
public BindConnectionInitializer(String dn, Credential credential)
dn
- bind dncredential
- bind credentialpublic String getBindDn()
public void setBindDn(String dn)
dn
- to bind aspublic Credential getBindCredential()
public void setBindCredential(Credential credential)
credential
- to use with bind DNpublic SaslConfig getBindSaslConfig()
public void setBindSaslConfig(SaslConfig config)
config
- sasl configpublic RequestControl[] getBindControls()
public void setBindControls(RequestControl... c)
c
- controls to setpublic Response<Void> initialize(Connection c) throws LdapException
ConnectionInitializer
initialize
in interface ConnectionInitializer
c
- connection to initializeLdapException
- if initialization failspublic boolean isEmpty()
Copyright © 2003-2019 Virginia Tech. All Rights Reserved.