Package com.aventstack.chaintest.http
Class HttpRetryHandler
java.lang.Object
com.aventstack.chaintest.http.HttpRetryHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionHttpRetryHandler(ChainTestApiClient client, int maxRetryAttempts, long retryIntervalMs, boolean throwAfterMaxRetryAttempts) HttpRetryHandler(ChainTestApiClient client, Map<String, String> config) -
Method Summary
Modifier and TypeMethodDescriptionsendWithRetries(Map<String, WrappedResponseAsync<Test>> collection) <T extends ChainTestEntity>
HttpResponse<T>trySend(T entity, Class<T> clazz, HttpMethod httpMethod) <T extends ChainTestEntity>
HttpResponse<T>trySend(T entity, Class<T> clazz, HttpMethod httpMethod, int maxRetryAttempts)
-
Field Details
-
MAX_RETRY_ATTEMPTS
public static final int MAX_RETRY_ATTEMPTS- See Also:
-
RETRY_INTERVAL
public static final long RETRY_INTERVAL- See Also:
-
-
Constructor Details
-
HttpRetryHandler
-
HttpRetryHandler
public HttpRetryHandler(ChainTestApiClient client, int maxRetryAttempts, long retryIntervalMs, boolean throwAfterMaxRetryAttempts)
-
-
Method Details
-
trySend
public <T extends ChainTestEntity> HttpResponse<T> trySend(T entity, Class<T> clazz, HttpMethod httpMethod, int maxRetryAttempts) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
trySend
public <T extends ChainTestEntity> HttpResponse<T> trySend(T entity, Class<T> clazz, HttpMethod httpMethod) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
sendWithRetries
public Map<String,WrappedResponseAsync<Test>> sendWithRetries(Map<String, WrappedResponseAsync<Test>> collection)
-