com.github.davidmoten.aws.lw.client.ExceptionFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-lightweight-client-java Show documentation
Show all versions of aws-lightweight-client-java Show documentation
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 extends RuntimeException> create(Response response);
ExceptionFactory DEFAULT = new ExceptionFactoryDefault();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy