diff options
Diffstat (limited to 'common-app-api/src/main/java/org/openecomp/sdc/common/http/client/api/ComparableHttpRequestRetryHandler.java')
-rw-r--r-- | common-app-api/src/main/java/org/openecomp/sdc/common/http/client/api/ComparableHttpRequestRetryHandler.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/http/client/api/ComparableHttpRequestRetryHandler.java b/common-app-api/src/main/java/org/openecomp/sdc/common/http/client/api/ComparableHttpRequestRetryHandler.java new file mode 100644 index 0000000000..1f25d31944 --- /dev/null +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/http/client/api/ComparableHttpRequestRetryHandler.java @@ -0,0 +1,8 @@ +package org.openecomp.sdc.common.http.client.api; +import org.apache.http.client.HttpRequestRetryHandler; + +public interface ComparableHttpRequestRetryHandler extends HttpRequestRetryHandler { + public default <T extends HttpRequestRetryHandler> boolean compare(T handler) { + return (handler != null && getClass() == handler.getClass()); + } +} |