@Service
public class TaskHandler
extends java.lang.Object
| Constructor and Description |
|---|
TaskHandler(ConfigurationHandler injectedConfigurationHandler,
ServerPackHandler injectedServerPackHandler,
ServerPackService injectedServerPackService)
Constructor responsible for our DI.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleGeneration(Task task)
JmsListener listening to the destination tasks.background and selector
type = 'generation', so only task that match the generation-type are worked
with in this method.If a task is received that matches this type, the generation of a new server pack is started. |
void |
handleScan(Task task)
JmsListener listening to the destination tasks.background and selector
type = 'scan', so only task that match the scan-type are worked with in this
method.If a task is received that matches this type, the CurseForge project and file ID of said task is checked for validity. |
@Autowired public TaskHandler(ConfigurationHandler injectedConfigurationHandler, ServerPackHandler injectedServerPackHandler, ServerPackService injectedServerPackService)
injectedConfigurationHandler - Instance of ConfigurationHandler.injectedServerPackHandler - Instance of ServerPackHandler.injectedServerPackService - Instance of ServerPackService.@JmsListener(destination="tasks.background",
selector="type = \'scan\'")
public void handleScan(Task task)
JmsListener listening to the destination tasks.background and selector
type = 'scan', so only task that match the scan-type are worked with in this
method.Generating and lastModified is bigger than 30 minutes.task - The task for which to check the CurseForge project and file ID, as well as status.@JmsListener(destination="tasks.background",
selector="type = \'generation\'")
public void handleGeneration(Task task)
JmsListener listening to the destination tasks.background and selector
type = 'generation', so only task that match the generation-type are worked
with in this method.task - The task with which to generate a server pack from a CurseForge project and file
ID.