Package de.espirit.firstspirit.agency
Interface ScheduleTaskAgent
public interface ScheduleTaskAgent
Agent providing access to all available
ScheduleTaskFactory
s.- Since:
- 5.2.190902
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SpecialistType<ScheduleTaskAgent>
Agent providing access to all availableScheduleTaskFactory
s. -
Method Summary
Modifier and TypeMethodDescription@NotNull Set<ScheduleTaskFactory<? extends ScheduleTaskFactory.TaskDto,
? extends ScheduleTask>> Get all availableScheduleTaskFactory
s.Optional<ScheduleTaskFactory<? extends ScheduleTaskFactory.TaskDto,
? extends ScheduleTask>> getTaskFactory
(@NotNull Class<? extends ScheduleTaskApplication<?>> applicationClass) Get theScheduleTaskFactory
responsible for creating and executing schedule tasks defined by aScheduleTaskApplication
.
-
Field Details
-
TYPE
Agent providing access to all availableScheduleTaskFactory
s. The agent's technical type can be used to request the agent from aSpecialistsBroker
.- Since:
- 5.2.190902
-
-
Method Details
-
getTaskFactories
@NotNull @NotNull Set<ScheduleTaskFactory<? extends ScheduleTaskFactory.TaskDto,? extends ScheduleTask>> getTaskFactories()Get all availableScheduleTaskFactory
s. This includes all build in FirstSpirit factories and custom factories implemented byScheduleTaskApplication
s.- Returns:
- A set containing all available
ScheduleTaskFactory
s. - Since:
- 5.2.190902
-
getTaskFactory
Optional<ScheduleTaskFactory<? extends ScheduleTaskFactory.TaskDto,? extends ScheduleTask>> getTaskFactory(@NotNull @NotNull Class<? extends ScheduleTaskApplication<?>> applicationClass) Get theScheduleTaskFactory
responsible for creating and executing schedule tasks defined by aScheduleTaskApplication
.- Parameters:
applicationClass
- The type ofScheduleTaskApplication
implementing the execution and persistency of a schedule task.- Returns:
- An
Optional
with aScheduleTaskFactory
responsible for creating and executing tasks of the desired type or an emptyOptional
if no matchingScheduleTaskFactory
is found. - Since:
- 5.2.190902
-