Clover icon

Coverage Report

  1. Project Clover database Wed Dec 3 2025 17:03:17 GMT
  2. Package jalview.ws2.api

File WebServiceJobHandle.java

 

Coverage histogram

../../../img/srcFileCovDistChart6.png
37% of files have more coverage

Code metrics

0
8
5
1
74
35
5
0.62
1.6
5
1

Classes

Class Line # Actions
WebServiceJobHandle 16 8 5
0.5384615753.8%
 

Contributing tests

This file is covered by 3 tests. .

Source view

1    package jalview.ws2.api;
2   
3    import java.util.Date;
4   
5    /**
6    * {@code WebServiceJob} represents a job running on a remote server. The object
7    * contains all the information needed to associate the job with an originating
8    * client and url, service being run and to poll the job and retrieve the
9    * results from the server. The {@code WebServiceJob} object is provided by the
10    * {@link WebServiceClientI#submit} method when the job is created.
11    *
12    * @see WebServiceClientI
13    *
14    * @author mmwarowny
15    */
 
16    public class WebServiceJobHandle
17    {
18    /** Name of the related client */
19    private final String serviceClient;
20   
21    /** Name of the related service */
22    private final String serviceName;
23   
24    /** URL the job is valid for */
25    private final String url;
26   
27    /** External job id as given by the server */
28    private final String jobId;
29   
30    private Date creationTime = new Date();
31   
 
32  37 toggle public WebServiceJobHandle(String serviceClient, String serviceName,
33    String url, String jobId)
34    {
35  37 this.serviceClient = serviceClient;
36  37 this.serviceName = serviceName;
37  37 this.url = url;
38  37 this.jobId = jobId;
39    }
40   
41    /**
42    * Get a URL this job originates from.
43    *
44    * @return job URL
45    */
 
46  0 toggle public String getUrl()
47    {
48  0 return url;
49    }
50   
51    /**
52    * Get an id assigned to the job by the server.
53    *
54    * @return job id handle
55    */
 
56  3 toggle public String getJobId()
57    {
58  3 return jobId;
59    }
60   
61    /**
62    * @return Job creation time
63    */
 
64  0 toggle public Date getCreationTime()
65    {
66  0 return creationTime;
67    }
68   
 
69  0 toggle public String toString()
70    {
71  0 return String.format("%s:%s [%s] Created %s", serviceClient, serviceName,
72    jobId, creationTime);
73    }
74    }