Constructor and Description |
---|
HttpJobClient(String baseUri)
Creates a new instance.
|
HttpJobClient(String baseUri,
String user,
String password)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getBaseUri()
Returns the base URI.
|
JobStatus |
getStatus(JobId id)
Obtains and returns the job information.
|
String |
getUser()
Returns the target user name for auth.
|
JobId |
register(JobScript script)
Creates a new job.
|
void |
submit(JobId id)
Request to execute the registered job.
|
String |
toString() |
public HttpJobClient(String baseUri)
baseUri
- the target base URLIllegalArgumentException
- if some parameters were null
public HttpJobClient(String baseUri, String user, String password)
baseUri
- the target base URLuser
- user namepassword
- passwordIllegalArgumentException
- if some parameters were null
public String getBaseUri()
public String getUser()
null
if there are no credentialspublic JobId register(JobScript script) throws IOException, InterruptedException
JobClient
register
in interface JobClient
script
- the job scriptIOException
- if failed to create a new jobInterruptedException
- if interruptedpublic JobStatus getStatus(JobId id) throws IOException, InterruptedException
JobClient
getStatus
in interface JobClient
id
- the target job IDIOException
- if failed to obtain the informationInterruptedException
- if interruptedpublic void submit(JobId id) throws IOException, InterruptedException
JobClient
submit
in interface JobClient
id
- the target job IDIOException
- if failed to request the jobInterruptedException
- if interruptedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.