| 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 nullpublic HttpJobClient(String baseUri, String user, String password)
baseUri - the target base URLuser - user namepassword - passwordIllegalArgumentException - if some parameters were nullpublic String getBaseUri()
public String getUser()
null if there are no credentialspublic JobId register(JobScript script) throws IOException, InterruptedException
JobClientregister in interface JobClientscript - the job scriptIOException - if failed to create a new jobInterruptedException - if interruptedpublic JobStatus getStatus(JobId id) throws IOException, InterruptedException
JobClientgetStatus in interface JobClientid - the target job IDIOException - if failed to obtain the informationInterruptedException - if interruptedpublic void submit(JobId id) throws IOException, InterruptedException
JobClientsubmit in interface JobClientid - the target job IDIOException - if failed to request the jobInterruptedException - if interruptedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.