Package com.isode.dsapi.util.cfg
Class LDAPProfile
java.lang.Object
com.isode.dsapi.util.cfg.LDAPProfile
Collects LDAP and SASL related configuration specifying directory location
bind credentials and provides directory session.
Works with DataNode configuration sources.
- Since:
- 15.2
- Author:
- mst
-
Constructor Summary
ConstructorsConstructorDescriptionLDAPProfile(com.isode.util.data.DataReaderTrackingListener readerListener) Constructs an LDAPProfile. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Unbind and releases directory session (if bound)voidconfigure(com.isode.util.data.DataNode ldapConfigNode) Read configuration from DataNode.protected voidfinalize()getDS()Returns current directory session.Returns current SASL configuration.Returns current SASL mapping.voidopen()Tries to open LDAP connection, reads SASL configuration.
-
Constructor Details
-
LDAPProfile
public LDAPProfile(com.isode.util.data.DataReaderTrackingListener readerListener) Constructs an LDAPProfile.- Parameters:
readerListener- which can be used to log configuration changes and to decrypt/decode some values (notnull)
-
-
Method Details
-
configure
public void configure(com.isode.util.data.DataNode ldapConfigNode) throws com.isode.util.data.DataException, LDAPProfileException Read configuration from DataNode.- Parameters:
ldapConfigNode- configuration node (nullallowed - than all settings will be default)- Throws:
com.isode.util.data.DataException- on data access/reading problemsLDAPProfileException- on bad configuration values
-
open
Tries to open LDAP connection, reads SASL configuration.(
configure(DataNode)must be called first)- Throws:
DSAPIException- on bind problems (should be handled by retrying after a while)LDAPProfileException- on configuration problems (should be handled by waiting for configuration change and retry)
-
close
public void close()Unbind and releases directory session (if bound) -
getDS
Returns current directory session.- Returns:
- current directory session (may be
null)
-
getSaslConfiguration
Returns current SASL configuration. (Should be called afteropen()which initialises it)- Returns:
- current SASL configuration (may be
nullbefore opening)
-
getSaslMapping
Returns current SASL mapping. (Should be called afteropen()which initialises it)- Returns:
- current SASL mapping (may be
nullbefore opening)
-
finalize
-