com.ibm.optim.oaas.client.job.JobInput.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api_java_client Show documentation
Show all versions of api_java_client Show documentation
Java client API for DOCplexCloud, version 1.0-STABLE-b832
The newest version!
JobInput (Java Client for DOcplexcloud 1.0 API)
com.ibm.optim.oaas.client.job
Interface JobInput
-
public interface JobInput
Interface for a job input source. The job executor has predefined functions to declare and upload attachments
from streams or files. A job input lets you define a custom source and when the executor is ready to
upload the content of the attachment, it will call the upload
function that you can define.
-
-
Method Summary
Methods
Modifier and Type
Method and Description
long
getLength()
Returns the length of the input source or -1 if unknown.
String
getName()
Returns the name of the input source.
boolean
isRepeatable()
Indicates if the upload can be repeated.
void
upload(JobClient client,
String jobid)
Uploads this source as the contents of an attachment to a given job.
-
-
Method Detail
-
getName
String getName()
Returns the name of the input source. The name will be used to declare the attachment.
- Returns:
- The input name.
-
getLength
long getLength()
Returns the length of the input source or -1 if unknown.
- Returns:
- The input source length.
-
isRepeatable
boolean isRepeatable()
Indicates if the upload can be repeated. If the upload is repeatable,
the executor will automatically retry to upload the content upon failure.
- Returns:
true
if the content can be repeated for retry.
-
upload
void upload(JobClient client,
String jobid)
throws OperationException,
IOException,
JobNotFoundException,
AttachmentNotFoundException,
SubscriptionException
Uploads this source as the contents of an attachment to a given job. The
attachment was declared by the executor with the name returned by the
job input.
- Parameters:
client
- The job client.jobid
- The job ID.
- Throws:
OperationException
- if any other remote exception was raised.
IOException
- if an I-O exception was raised.
AttachmentNotFoundException
- if the attachment was not declared or not found.
JobNotFoundException
- if the job is not found with the given id.
SubscriptionException
- if there is not a valid subscription for this job.
Copyright © 2015–2017 IBM Corporation. Licensed under the Apache License, Version 2.0.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy