public class ConnectionFactoryValidator extends AbstractInitializableComponent implements Validator
Connection.open() to determine if the ConnectionFactory is properly
configured.| Modifier and Type | Field and Description |
|---|---|
private ConnectionFactory |
connectionFactory
Connection factory to validate.
|
private org.slf4j.Logger |
log
Class logger.
|
private boolean |
throwOnValidateError
whether validate should throw, default value is .
|
| Constructor and Description |
|---|
ConnectionFactoryValidator()
Constructor.
|
ConnectionFactoryValidator(ConnectionFactory factory)
Deprecated.
- use the property setters
|
ConnectionFactoryValidator(ConnectionFactory factory,
boolean throwOnError)
Deprecated.
- use the property setters
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize() |
ConnectionFactory |
getConnectionFactory()
Returns the connection factory.
|
boolean |
isThrowValidateError()
Returns whether
validate() should throw or log errors. |
void |
setConnectionFactory(ConnectionFactory factory)
Sets the connection factory.
|
void |
setThrowValidateError(Boolean what)
Sets whether
validate() should throw or log errors. |
void |
validate() |
destroy, doDestroy, initialize, isDestroyed, isInitializedprivate final org.slf4j.Logger log
@Nonnull private ConnectionFactory connectionFactory
private boolean throwOnValidateError
@Deprecated public ConnectionFactoryValidator(@Nonnull ConnectionFactory factory)
factory - to validate@Deprecated public ConnectionFactoryValidator(@Nonnull ConnectionFactory factory, boolean throwOnError)
factory - to validatethrowOnError - whether validate() should throw or log errorspublic ConnectionFactoryValidator()
protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationException@Nonnull public void setConnectionFactory(@Nonnull ConnectionFactory factory)
factory - the connection factory@Nonnull public ConnectionFactory getConnectionFactory()
public void setThrowValidateError(Boolean what)
validate() should throw or log errors.what - whether validate() should throw or log errorspublic boolean isThrowValidateError()
validate() should throw or log errors.validate() should throw or log errorspublic void validate()
throws ValidationException
validate in interface ValidatorValidationExceptionCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.