Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class Retry

extends Task
implements TaskContainer
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.TaskContainer
Imports
org.apache.tools.ant.BuildException, .Project, .Task, .TaskContainer

Retries the nested task a set number of times
Since
Ant 1.7.1

Field Summary

Modifier and TypeField and Description
private Task
nestedTask

task to execute n times

private int
retryCount

set retryCount to 1 by default

private int
retryDelay

The time to wait between retries in milliseconds, default to 0.

Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
addTask(Task
the task to retry.
t
)

Implements org.apache.tools.ant.TaskContainer.addTask.

set the task
public void
execute()

Overrides org.apache.tools.ant.Task.execute.

perform the work
public void
setRetryCount(int
the number to use.
n
)

set the number of times to retry the task

public void
setRetryDelay(int
the time between retries.
retryDelay
)

set the delay between retries (in milliseconds)

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

nestedTaskback to summary
private Task nestedTask

task to execute n times

retryCountback to summary
private int retryCount

set retryCount to 1 by default

retryDelayback to summary
private int retryDelay

The time to wait between retries in milliseconds, default to 0.

Constructor Detail

Retryback to summary
public Retry()

Method Detail

addTaskback to summary
public synchronized void addTask(Task t)

Implements org.apache.tools.ant.TaskContainer.addTask.

set the task

Parameters
t:Task

the task to retry.

Annotations
@Override
executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

perform the work

Annotations
@Override
Exceptions
BuildException:
if there is an error.
setRetryCountback to summary
public void setRetryCount(int n)

set the number of times to retry the task

Parameters
n:int

the number to use.

setRetryDelayback to summary
public void setRetryDelay(int retryDelay)

set the delay between retries (in milliseconds)

Parameters
retryDelay:int

the time between retries.

Since
Ant 1.8.3