Class CombiningValidator<T>
java.lang.Object
com.sap.cloud.security.token.validation.CombiningValidator<T>
- Type Parameters:
T- the type to be validated.
- All Implemented Interfaces:
Validator<T>
This is a special validator that combines several validators into one. By
default the validation stops after one invalid result has been found.
-
Constructor Summary
ConstructorsConstructorDescriptionCombiningValidator(Validator<T>... validators) CombiningValidator(List<Validator<T>> validators) -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterValidationListener(ValidationListener validationListener) Components that are interested in the result of the token validation can register a validation listener which is called whenever a token is validated.voidremoveValidationListener(ValidationListener validationListener) Use this method to remove a registered listener so that it is not called anymore.toString()Validates the given object.
-
Constructor Details
-
CombiningValidator
-
CombiningValidator
-
-
Method Details
-
validate
Description copied from interface:ValidatorValidates the given object.- Specified by:
validatein interfaceValidator<T>- Parameters:
t- the object of typeValidatorto be validated.- Returns:
- the validation result as
ValidationResult.
-
getValidators
-
toString
-
registerValidationListener
Components that are interested in the result of the token validation can register a validation listener which is called whenever a token is validated. Listener must implement theValidationListenerinterface.- Parameters:
validationListener- the listener to be added.
-
removeValidationListener
Use this method to remove a registered listener so that it is not called anymore.- Parameters:
validationListener- the listener to be removed.
-