View Javadoc

1   package org.astrogrid.jes.delegate.impl;
2   
3   import org.astrogrid.community.beans.v1.Account;
4   import org.astrogrid.jes.delegate.Delegate;
5   import org.astrogrid.jes.delegate.JesDelegateException;
6   import org.astrogrid.workflow.beans.v1.Workflow;
7   import org.astrogrid.workflow.beans.v1.execution.JobURN;
8   import org.astrogrid.workflow.beans.v1.execution.WorkflowSummaryType;
9   
10  /***
11   * Test implementation of a job controller delegate - performs no communication, returns dummy data.
12   * @author  Jeff Lusted
13   * @version 1.0 02-Aug-2003
14   * @since   AstroGrid 1.3
15   */
16  public class TestJobControllerDelegateImpl extends JobControllerDelegate {
17  
18  
19      public TestJobControllerDelegateImpl( ){
20          this.targetEndPoint = Delegate.TEST_URI;
21      }
22  
23  
24  
25  
26  
27      /***
28       * @see org.astrogrid.jes.delegate.JobController#submitWorkflow(java.lang.String)
29       */
30      public JobURN submitWorkflow(Workflow j) throws JesDelegateException {
31          log.info("Test Job Controller: submitting " + j.toString());
32          JobURN result = new JobURN();
33          result.setContent("jes:job:dummy");
34          return result;
35      }
36  
37  
38  
39  
40  
41      /***
42       * @see org.astrogrid.jes.delegate.JobController#cancelJob(org.astrogrid.workflow.beans.v1.execution.JobURN)
43       */
44      public void cancelJob(JobURN urn) throws JesDelegateException {
45          log.info("Test Job Controller: cancelling " + urn.getContent());
46      }
47  
48  
49  
50  
51  
52      /***
53       * @see org.astrogrid.jes.delegate.JobController#deleteJob(org.astrogrid.workflow.beans.v1.execution.JobURN)
54       */
55      public void deleteJob(JobURN urn) throws JesDelegateException {
56          log.info("Test Job Controller: deleting " + urn.getContent());
57      }
58  
59  
60  
61  
62  
63      /***
64       * @see org.astrogrid.jes.delegate.JobController#readJobList(org.astrogrid.community.beans.v1.Account)
65       */
66      public WorkflowSummaryType[] listJobs(Account acc) throws JesDelegateException {
67          log.info("Test Job Controller: listing jobs ");
68          return new WorkflowSummaryType[]{};
69      }
70  
71  
72  
73  
74  
75      /***
76       * @see org.astrogrid.jes.delegate.JobController#readJob(org.astrogrid.workflow.beans.v1.execution.JobURN)
77       */
78      public Workflow readJob(JobURN urn) throws JesDelegateException {
79          log.info("Test Job Controller: reading workflow for " + urn.getContent());
80          return new Workflow();
81      }
82  
83  
84  
85  
86  
87  
88  } // end of class TestDelegateImpl