Guest User

Untitled

a guest
Nov 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. Map<String, TaskFactory> taskRegistry = new HashMap<String, TaskFactory>();
  2.  
  3. taskRegistry.put(CommandTask.NAME, new TaskFactory() {
  4. @Override
  5. public Task createNewTask(TaskCallbackContext context) {
  6. return new CommandTask(context);
  7. }
  8. });
  9.  
  10. /*
  11. taskRegistry.put(DataCollectingTask.NAME, new TaskFactory() {
  12. @Override
  13. public Task createNewTask(TaskCallbackContext context) {
  14. return new DataCollectingTask(context);
  15. }
  16. });
  17. */
  18. /*
  19. taskRegistry.put(DataPushingTask.NAME, new TaskFactory() {
  20. @Override
  21. public Task createNewTask(TaskCallbackContext context) {
  22. return new DataPushingTask(context);
  23. }
  24. });
  25. */
  26.  
  27. machineEngine.registerStateModelFactory("Task", new TaskStateModelFactory(zkHelixManager, taskRegistry));
Add Comment
Please, Sign In to add comment