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 void
close()
Releases any resources associated with this LDAP client.io.reactivex.rxjava3.core.Single<LdapClientSocket>
connect()
Returns aSingle
which 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:LdapClient
Returns aSingle
which connects to a peer each time it is subscribed.- Specified by:
connect
in interfaceLdapClient
- Returns:
- A
Single
which connects to a peer each time it is subscribed.
-
close
public void close()
Description copied from interface:LdapClient
Releases 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.
close
on 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceLdapClient
-
-