Package com.google.jenkins.plugins.util
Class Executor.Default
- java.lang.Object
-
- com.google.jenkins.plugins.util.Executor
-
- com.google.jenkins.plugins.util.Executor.Default
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.jenkins.plugins.util.Executor
Executor.Default
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
execute(RequestCallable<T> block)
Executes the request, returning a response of the appropriate type.
-
-
-
Constructor Detail
-
Default
public Default()
-
Default
public Default(int maxRetry, boolean composeRetry)
- Parameters:
maxRetry
- the maximum number of retries to attempt inexecute(RequestCallable)
.composeRetry
- whether nested retries block cause retries to compose or not. If set to false, we will wrap the exception of the last retry step in an instance ofMaxRetryExceededException
, which prevents any further retries.
-
-
Method Detail
-
execute
public <T> T execute(RequestCallable<T> block) throws IOException, ExecutorException
Executes the request, returning a response of the appropriate type.- Specified by:
execute
in classExecutor
- Type Parameters:
T
- The type of the expected response- Parameters:
block
- The request we are issuing- Returns:
- a Json object of the given type
- Throws:
IOException
- if anything goes wrongExecutorException
-
-