public class MapJobRegistry extends java.lang.Object implements JobRegistry
JobRegistry
.Constructor and Description |
---|
MapJobRegistry() |
Modifier and Type | Method and Description |
---|---|
Job |
getJob(java.lang.String name)
Locates a
Job at runtime. |
java.util.Set<java.lang.String> |
getJobNames()
Provides an unmodifiable view of the job names.
|
void |
register(JobFactory jobFactory)
Registers a
Job at runtime. |
void |
unregister(java.lang.String name)
Unregisters a previously registered
Job . |
public void register(JobFactory jobFactory) throws DuplicateJobException
JobRegistry
Job
at runtime.register
in interface JobRegistry
jobFactory
- the Job
to be registeredDuplicateJobException
- if a factory with the same job name has
already been registered.public void unregister(java.lang.String name)
JobRegistry
Job
. If it was not
previously registered there is no error.unregister
in interface JobRegistry
name
- the Job
to unregister.public Job getJob(@Nullable java.lang.String name) throws NoSuchJobException
JobLocator
Job
at runtime.getJob
in interface JobLocator
name
- the name of the Job
which should be
uniqueJob
identified by the given nameNoSuchJobException
- if the required configuration can
not be found.public java.util.Set<java.lang.String> getJobNames()
getJobNames
in interface ListableJobLocator