public class GroupAwareJob extends java.lang.Object implements Job
Job that can optionally prepend a group name to another job's name,
to make it fit a naming convention for type or origin. E.g. the source job
might be overnightJob and the group
financeDepartment, which would result in a Job with
identical functionality but named financeDepartment.overnightJob
. The use of a "." separator for elements is deliberate, since it is a "safe"
character in a URL.| Constructor and Description |
|---|
GroupAwareJob(Job delegate)
Create a new
Job with the delegate and no group name. |
GroupAwareJob(java.lang.String groupName,
Job delegate)
Create a new
Job with the given group name and delegate. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
void |
execute(JobExecution execution)
Run the
JobExecution and update the meta information like status
and statistics as necessary. |
JobParametersIncrementer |
getJobParametersIncrementer()
If clients need to generate new parameters for the next execution in a
sequence they can use this incrementer.
|
JobParametersValidator |
getJobParametersValidator()
A validator for the job parameters of a
JobExecution. |
java.lang.String |
getName()
Concatenates the group name and the delegate job name (joining with a
".").
|
int |
hashCode() |
boolean |
isRestartable()
Flag to indicate if this job can be restarted, at least in principle.
|
java.lang.String |
toString() |
public GroupAwareJob(Job delegate)
Job with the delegate and no group name.delegate - a delegate for the features of a regular Jobpublic void execute(JobExecution execution)
JobJobExecution and update the meta information like status
and statistics as necessary. This method should not throw any exceptions
for failed execution. Clients should be careful to inspect the
JobExecution status to determine success or failure.execute in interface Jobexecution - a JobExecutionpublic java.lang.String getName()
getName in interface JobJob.getName()public boolean isRestartable()
JobisRestartable in interface Job@Nullable public JobParametersIncrementer getJobParametersIncrementer()
Jobnull,
in the case that this job does not have a natural sequence.getJobParametersIncrementer in interface Jobpublic JobParametersValidator getJobParametersValidator()
JobJobExecution. Clients of
a Job may need to validate the parameters for a launch, before or during
the execution.getJobParametersValidator in interface Jobnull)public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object