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

io.vrap.rmf.base.client.http.PolicyMiddleware Maven / Gradle / Ivy

There is a newer version: 17.17.0
Show newest version

package io.vrap.rmf.base.client.http;

import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;

import io.vrap.rmf.base.client.ApiHttpResponse;

import dev.failsafe.Policy;
import dev.failsafe.spi.Scheduler;

public interface PolicyMiddleware extends Middleware {
    public static PolicyMiddleware of(final List>> policies) {
        return new PolicyMiddlewareImpl(Scheduler.DEFAULT, policies);
    }

    public static PolicyMiddleware of(final Scheduler scheduler, final List>> policies) {
        return new PolicyMiddlewareImpl(scheduler, policies);
    }

    public static PolicyMiddleware of(final ScheduledExecutorService scheduler,
            final List>> policies) {
        return new PolicyMiddlewareImpl(Scheduler.of(scheduler), policies);
    }

    public static PolicyMiddleware of(final ExecutorService scheduler,
            final List>> policies) {
        return new PolicyMiddlewareImpl(Scheduler.of(scheduler), policies);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy