Package de.espirit.firstspirit.agency
Interface ScheduleTaskAgent
public interface ScheduleTaskAgent
Agent providing access to all available
ScheduleTaskFactorys.- Since:
- 5.2.190902
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SpecialistType<ScheduleTaskAgent>Agent providing access to all availableScheduleTaskFactorys. -
Method Summary
Modifier and TypeMethodDescription@NotNull Set<ScheduleTaskFactory<? extends ScheduleTaskFactory.TaskDto,? extends ScheduleTask>> Get all availableScheduleTaskFactorys.Optional<ScheduleTaskFactory<? extends ScheduleTaskFactory.TaskDto,? extends ScheduleTask>> getTaskFactory(@NotNull Class<? extends ScheduleTaskApplication<?>> applicationClass) Get theScheduleTaskFactoryresponsible for creating and executing schedule tasks defined by aScheduleTaskApplication.
-
Field Details
-
TYPE
Agent providing access to all availableScheduleTaskFactorys. 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 availableScheduleTaskFactorys. This includes all build in FirstSpirit factories and custom factories implemented byScheduleTaskApplications.- Returns:
- A set containing all available
ScheduleTaskFactorys. - Since:
- 5.2.190902
-
getTaskFactory
Optional<ScheduleTaskFactory<? extends ScheduleTaskFactory.TaskDto,? extends ScheduleTask>> getTaskFactory(@NotNull @NotNull Class<? extends ScheduleTaskApplication<?>> applicationClass) Get theScheduleTaskFactoryresponsible for creating and executing schedule tasks defined by aScheduleTaskApplication.- Parameters:
applicationClass- The type ofScheduleTaskApplicationimplementing the execution and persistency of a schedule task.- Returns:
- An
Optionalwith aScheduleTaskFactoryresponsible for creating and executing tasks of the desired type or an emptyOptionalif no matchingScheduleTaskFactoryis found. - Since:
- 5.2.190902
-