Package io.strimzi.kafka.oauth.common
Interface HttpTask<T>
- Type Parameters:
T- A generic return type of the task result
public interface HttpTask<T>
An interface that allows a started task to directly throw an IOException.
It is primarily meant to be used in conjunction with the
HttpUtil.doWithRetries(int, long, io.strimzi.kafka.oauth.common.MetricsHandler, io.strimzi.kafka.oauth.common.HttpTask<T>) method,
to perform a successful HTTP request to the authorization server, where the HttpTask defines an individual
single invocation.-
Method Summary
-
Method Details
-
run
Run a task, and return the result as an object or a null if successful, otherwise throw an exception. Any exception thrown (checked or unchecked) will result in a repeat attempt byHttpUtil.doWithRetries(int, long, io.strimzi.kafka.oauth.common.MetricsHandler, io.strimzi.kafka.oauth.common.HttpTask<T>).- Returns:
- A result object
- Throws:
IOException- An exception signalling a connectivity issue, a timeout or an unexpected response status.
-