All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.codecentric.spring.boot.chaos.monkey.configuration.AssaultPropertiesLatencyRangeValidator Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
package de.codecentric.spring.boot.chaos.monkey.configuration;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class AssaultPropertiesLatencyRangeValidator implements ConstraintValidator {

    @Override
    public boolean isValid(final AssaultProperties assaultProperties,
                           final ConstraintValidatorContext constraintValidatorContext) {
        if (assaultProperties == null) {
            return true;
        }

        return assaultProperties.getLatencyRangeStart() <= assaultProperties.getLatencyRangeEnd();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy