Job Module

The Job Module provides the API allowing two ways communication with a task executed in a background thread. A job offers progress information, a live log and a Java bean based question and answer system but it can be extended. The source code is available on GitHub.

Existing jobs can be accessed via the JobManager interface as follows:

Request jobRequest = new DefaultRequest();

jobRequest.setId("taskid");

jobRequest.setInteractive(true);

jobRequest.setVerbose(true);

jobRequest.setProperty("job type parameter", "value");

// Starts a new job with the provided "jobtype" identifier and waits until its finished.
jobManager.executeJob("jobtype", request)

// Adds the new job in the queue of jobs to execute.
jobManager.addJob("jobtype", request)
  • public void setId(String id) - allows to retrieve or to save the status of this unique task.
  • public void setInteractive(boolean interactive) - indicates whether the job is allowed to ask questions, whether it should be fully automated and if it should use default answers. The default value is false.
  • public void setVerbose(boolean verbose) - indicates whether the job should log the progress information. The default value is true.

To create a new job, you need to register a component with:

 

Related Pages

Search this space

 

Most popular tags

Failed to execute the [groovy] macro
  1. access rights
  2. activity stream
  3. annotation
  4. attachment
  5. comment
  6. Document Tree Macro
  7. export
  8. Extension Manager
  9. Flamingo skin
  10. global user
  11. Groovy event listener
  12. group
  13. nested page
  14. search
  15. skin
  16. syntax
  17. user
  18. user profile
  19. velocity macros
  20. wiki
  21. wysiwyg
  22. XWiki Applications
  23. xwikiattachment_archive table
  24. xwikiattachment table
  25. xwikiattrecyclebin table
  26. xwikiproperties table

[Display all tags from this space]