Class ValidHostValidator
java.lang.Object
org.apache.logging.log4j.core.config.plugins.validation.validators.ValidHostValidator
- All Implemented Interfaces:
- ConstraintValidator<ValidHost>
Validator that checks an object to verify it is a valid hostname or IP address. Validation rules follow the same
 logic as in 
InetAddress.getByName(String).- Since:
- 2.8
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidinitialize(ValidHost annotation) Called before this validator is used with the constraint annotation value.booleanIndicates if the given value is valid.
- 
Constructor Details- 
ValidHostValidatorpublic ValidHostValidator()
 
- 
- 
Method Details- 
initializeDescription copied from interface:ConstraintValidatorCalled before this validator is used with the constraint annotation value.- Specified by:
- initializein interface- ConstraintValidator<ValidHost>
- Parameters:
- annotation- the annotation value this validator will be validating.
 
- 
isValidDescription copied from interface:ConstraintValidatorIndicates if the given value is valid.- Specified by:
- isValidin interface- ConstraintValidator<ValidHost>
- Parameters:
- name- the name to use for error reporting
- value- the value to validate.
- Returns:
- trueif the given value is valid.
 
 
-