Guest User

Untitled

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