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

io.smallrye.faulttolerance.config.ApplyFaultToleranceConfig Maven / Gradle / Ivy

There is a newer version: 6.6.2
Show newest version
package io.smallrye.faulttolerance.config;

import org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException;

import io.smallrye.faulttolerance.api.ApplyFaultTolerance;
import io.smallrye.faulttolerance.autoconfig.AutoConfig;
import io.smallrye.faulttolerance.autoconfig.Config;

@AutoConfig
public interface ApplyFaultToleranceConfig extends ApplyFaultTolerance, Config {
    @Override
    default void validate() {
        final String INVALID_APPLY_FAULT_TOLERANCE_ON = "Invalid @ApplyFaultTolerance on ";

        if (value().isEmpty()) {
            throw new FaultToleranceDefinitionException(INVALID_APPLY_FAULT_TOLERANCE_ON + method()
                    + ": value shouldn't be empty");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy