Package gri.tasks.managers

Examples of gri.tasks.managers.TaskManager


      e.printStackTrace();
    }
  }
 
  public static void test1() throws Exception {
    TaskManager taskManager = createTaskManager();
   
    //print tasks:
    String [] taskIds = taskManager.getTaskIds();
    System.out.println("Tasks: ");
    for (int i=0; i<taskIds.length; i++)
      System.out.println("  " + taskIds[i]);
    System.out.println();
   
View Full Code Here


  public Object read(Element elem) throws IOException {
    return readJobManager(elem);
  }

  public void writeJobManager(BasicJobManager jobManager, Element elem) throws IOException {
    TaskManager taskManager = jobManager.getTaskManager();

    Element managerElem = new Element("taskManager");
    taskManagerSerializer.write(taskManager, managerElem);
    elem.addContent(managerElem);
  }
View Full Code Here

  public BasicJobManager readJobManager(Element elem) throws IOException {
    Element managerElem = elem.getChild("taskManager");
    if (managerElem == null)
      throw new MissingElementException("taskManager", elem);

    TaskManager taskManager = (TaskManager)taskManagerSerializer.read(managerElem);
    return new BasicJobManager(taskManager);
  }
View Full Code Here

 
  /**
   * Runs the task with the given inputs.
   */
  public void runTask(String id, Map inputs) throws Exception {
    TaskManager taskManager = getTaskManager();
   
    System.out.println("Running task: " + id);
    System.out.println();
    System.out.println("Inputs:");
    print(inputs, "  ");
    System.out.println();
   
    Task task = taskManager.getTask(id);
    Map outputs = task.execute(inputs);
   
    System.out.println("Task complete!");
    System.out.println();
    System.out.println("Outputs:");
View Full Code Here

 
  /**
   * Prints out the TaskDescription and TaskDef for the given task.
   */
  public void describeTask(String id) {
    TaskManager taskManager = getTaskManager();
   
    //description:
    System.out.println("Overview:");
    System.out.println("-----------------------------------");
   
    TaskDescription taskDesc = taskManager.getTaskDescription(id);
    System.out.println("Name: " + taskDesc.getName());
    System.out.println("Description: " + taskDesc.getDescription());
    System.out.println();
   
    //parameters:
    TaskDef taskDef = taskManager.getTaskDefinition(id);
    System.out.println(taskDef);
  }
View Full Code Here

 
  /**
   * Runs the task with the given inputs.
   */
  public void runTask(String id, Map inputs) throws Exception {
    TaskManager taskManager = getTaskManager();
   
    System.out.println("Running task: " + id);
    System.out.println();
    System.out.println("Inputs:");
    print(inputs, "  ");
    System.out.println();
   
    Task task = taskManager.getTask(id);
    Map outputs = task.execute(inputs);
   
    System.out.println("Task complete!");
    System.out.println();
    System.out.println("Outputs:");
View Full Code Here

    //TaskProvider provider = getSSHProvider(directory);

    //GRIDP:

    TaskManager taskManager1 = getLocalTaskManager(moduleFolder);
    JobManager gridpJobManager = new BasicJobManager(taskManager1);
    //gridpJobManager = createRemoteSystem(provider);
    jobManagers.addJobManager("Local System", gridpJobManager);

    //TaskManager taskManager2 = gridp.getSSHProvider(directory);
View Full Code Here

    gri.tasks.gui.DefaultStyles.load();

    //String directory = "C:\\Program Files\\GRI\\JServer\\modules";
    String directory = "C:\\Users\\rogersda\\Desktop\\Gridp\\Module Collection";

    TaskManager taskManager = getLocalTaskManager(new File(directory));
    //TaskManager taskManager = getSSHTaskManager(new File(directory));

    JobManager jobManager;
    FileViewManager viewManager;
    try {
View Full Code Here

  /**
   * Loads the TaskManager and displays a list of tasks
   */
  public void listTasks() {
   
    TaskManager taskManager = getTaskManager();
    String [] taskIds = taskManager.getTaskIds();
   
    System.out.println("Task List:");
    if (taskIds.length == 0)
      System.out.println("  (none)");
    else {
View Full Code Here

 
  /**
   * Prints out the TaskDescription and TaskDef for the given task.
   */
  public void describeTask(String id) {
    TaskManager taskManager = getTaskManager();
   
    //description:
    System.out.println("Overview:");
    System.out.println("-----------------------------------");
   
    TaskDescription taskDesc = taskManager.getTaskDescription(id);
    System.out.println("Name: " + taskDesc.getName());
    System.out.println("Description: " + taskDesc.getDescription());
    System.out.println();
   
    //parameters:
    TaskDef taskDef = taskManager.getTaskDefinition(id);
    System.out.println(taskDef);
  }
View Full Code Here

TOP

Related Classes of gri.tasks.managers.TaskManager

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.