1 package jalview.ws2.api;
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.
12 * @see WebServiceClientI
16 public class WebServiceJobHandle
18 /** Name of the related client */
19 private final String serviceClient;
21 /** Name of the related service */
22 private final String serviceName;
24 /** URL the job is valid for */
25 private final String url;
27 /** External job id as given by the server */
28 private final String jobId;
30 private Date creationTime = new Date();
32 public WebServiceJobHandle(String serviceClient, String serviceName,
33 String url, String jobId)
35 this.serviceClient = serviceClient;
36 this.serviceName = serviceName;
42 * Get a URL this job originates from.
46 public String getUrl()
52 * Get an id assigned to the job by the server.
54 * @return job id handle
56 public String getJobId()
62 * @return Job creation time
64 public Date getCreationTime()
69 public String toString()
71 return String.format("%s:%s [%s] Created %s", serviceClient, serviceName,