Package org.forgerock.openam.ldap
Class LDAPUtils.FailoverLdapClient
- java.lang.Object
-
- org.forgerock.openam.ldap.LDAPUtils.FailoverLdapClient
-
- All Implemented Interfaces:
Closeable,AutoCloseable,LdapClient
- Enclosing class:
- LDAPUtils
public static class LDAPUtils.FailoverLdapClient extends Object implements LdapClient
Simple failover Ldap Client.
-
-
Constructor Summary
Constructors Constructor Description FailoverLdapClient(List<LdapClient> clients)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Releases any resources associated with this LDAP client.io.reactivex.rxjava3.core.Single<LdapClientSocket>connect()Returns aSinglewhich connects to a peer each time it is subscribed.
-
-
-
Constructor Detail
-
FailoverLdapClient
public FailoverLdapClient(List<LdapClient> clients)
Constructor.- Parameters:
clients- Client list
-
-
Method Detail
-
connect
public io.reactivex.rxjava3.core.Single<LdapClientSocket> connect()
Description copied from interface:LdapClientReturns aSinglewhich connects to a peer each time it is subscribed.- Specified by:
connectin interfaceLdapClient- Returns:
- A
Singlewhich connects to a peer each time it is subscribed.
-
close
public void close()
Description copied from interface:LdapClientReleases any resources associated with this LDAP client. Depending on the implementation an LDAP client may:- do nothing
- close underlying LDAP clients (e.g. load-balancers)
- close pooled connections (e.g. connection pools)
- shutdown IO event service and related thread pools.
closeon an LDAP client which is already closed has no effect.Applications should avoid closing LDAP clients while there are remaining active sockets in use or connection attempts in progress.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceLdapClient
-
-