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 TypeMethodDescriptionvoid
close()
Unbind and releases directory session (if bound)void
configure
(com.isode.util.data.DataNode ldapConfigNode) Read configuration from DataNode.protected void
finalize()
getDS()
Returns current directory session.Returns current SASL configuration.Returns current SASL mapping.void
open()
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 (null
allowed - 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
null
before opening)
-
getSaslMapping
Returns current SASL mapping. (Should be called afteropen()
which initialises it)- Returns:
- current SASL mapping (may be
null
before opening)
-
finalize
-