public class ConsensusLdapConnectionLivenessValidator extends Object implements LdapConnectionLivenessValidator
LdapConnectionLivenessValidator implemenation
which requires all delegates to validate a given connection. Considers
a connection invalid if any one member returns false
from LdapConnectionLivenessValidator.isConnectionAlive(com.novell.ldap.LDAPConnection).
Intended for chaining together multiple liveness strategies. E.g.,
to assist with logging, an institution may choose to require both
MaxLifetimeLdapConnectionLivenessValidator and
SearchExecutingLdapConnectionLivenessValidator to validate
connection liveness.
| Constructor and Description |
|---|
ConsensusLdapConnectionLivenessValidator() |
| Modifier and Type | Method and Description |
|---|---|
List<LdapConnectionLivenessValidator> |
getDelegates()
Assign the list of
LdapConnectionLivenessValidators to
consult when validating any given connection. |
boolean |
isConnectionAlive(com.novell.ldap.LDAPConnection connectionToTest)
Tests the given
LDAPConnection with each registered
LdapConnectionLivenessValidator until one such delegate
returns false>, in which case this method also
returns false. |
void |
setDelegates(List<LdapConnectionLivenessValidator> delegates)
Assign the list of
LdapConnectionLivenessValidators to
consult when validating any given connection. |
public ConsensusLdapConnectionLivenessValidator()
public boolean isConnectionAlive(com.novell.ldap.LDAPConnection connectionToTest)
LDAPConnection with each registered
LdapConnectionLivenessValidator until one such delegate
returns false>, in which case this method also
returns false. Otherwise returns true,
even if the registered delegate list is empty.isConnectionAlive in interface LdapConnectionLivenessValidatorpublic List<LdapConnectionLivenessValidator> getDelegates()
LdapConnectionLivenessValidators to
consult when validating any given connection. Will not
return null.public void setDelegates(List<LdapConnectionLivenessValidator> delegates)
LdapConnectionLivenessValidators to
consult when validating any given connection. If null,
will result in this object caching an empty list.delegates - Copyright © 2003–2022 Sakai Project. All rights reserved.