Package org.japura.task.executors

Examples of org.japura.task.executors.TaskExecutor


  public void register(TaskExecutor taskExecutor) {
  lock.lock();
  try {
    Iterator<TaskExecutor> it = taskExecutors.iterator();
    while (it.hasNext()) {
    TaskExecutor e = it.next();
    if (e.isShutdown() && e.hasTask() == false) {
      it.remove();
    }
    }

    if (taskExecutors.contains(taskExecutor) == false) {
View Full Code Here


    taskExecutionUI.afterExecute(event);
  }
  }

  private String getGroupId(TaskExecutionUIEvent event) {
  TaskExecutor owner = event.getTaskOwner();
  if (owner instanceof Group) {
    Group group = (Group) owner;
    Controller c = group.getRootController();
    if (c != null && Application.getControllerManager().contains(c)) {
    return group.getId();
View Full Code Here

    TaskTest task = new TaskTest();
    tasks3.add(task);
    allTasks.add(task);
  }

  TaskExecutor executor = Application.getTaskManager().getGlobalExecutor();

  executor.submitTask(tasks1.toArray(new TaskTest[0]));
  for (TaskTest task : tasks2) {
    executor.submitTask(task);
  }
  executor.submitTask(tasks3.toArray(new TaskTest[0]));

  waitForTaskExecutions();

  test(canceledMethods, new ArrayList<TaskTest>());
  test(handleExceptionMethods, new ArrayList<TaskTest>());
View Full Code Here

  this.edt = edt;
  this.waitForEDT = task.isWaitForEDT();
  this.timeSpent = task.getBackgroundTimeSpent();
  this.taskClass = task.getClass().getName();

  TaskExecutor owner = task.getOwner();
  if (owner == null) {
    this.source = "NULL";
  } else {
    this.source = owner.toString();
  }

  if (session == null) {
    this.session = "NULL";
  } else {
View Full Code Here

TOP

Related Classes of org.japura.task.executors.TaskExecutor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.