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

org.jboss.resteasy.reactive.common.model.MaybeRestClientInterface Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package org.jboss.resteasy.reactive.common.model;

public class MaybeRestClientInterface {
    private final RestClientInterface restClientInterface;
    private final String failure;

    private MaybeRestClientInterface(RestClientInterface restClientInterface, String failure) {
        this.restClientInterface = restClientInterface;
        this.failure = failure;
    }

    public String getFailure() {
        return failure;
    }

    public boolean exists() {
        return restClientInterface != null;
    }

    public RestClientInterface getRestClientInterface() {
        return restClientInterface;
    }

    public static MaybeRestClientInterface failure(String failure) {
        return new MaybeRestClientInterface(null, failure);
    }

    public static MaybeRestClientInterface success(RestClientInterface restClientInterface) {
        return new MaybeRestClientInterface(restClientInterface, null);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy