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

com.github.davidmoten.aws.lw.client.ExceptionFactory Maven / Gradle / Ivy

Go to download

Lightweight client for all AWS services (but still with useful builders and XML parser)

The newest version!
package com.github.davidmoten.aws.lw.client;

import java.util.Optional;

import com.github.davidmoten.aws.lw.client.internal.ExceptionFactoryDefault;

@FunctionalInterface
public interface ExceptionFactory {

    /**
     * Returns a {@link RuntimeException} (or subclass) if the response error
     * condition is met (usually {@code !response.isOk()}. If no exception to be
     * thrown then returns {@code Optional.empty()}.
     * 
     * @param response response to map into exception
     * @return optional runtime exception
     */
    Optional create(Response response);

    ExceptionFactory DEFAULT = new ExceptionFactoryDefault();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy