|
Version: ${maven.project.version} | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Job
An interface defining a job. A job represents an invocation of an analysis tool. The invocation can be synchronous (blocking) or asynchronous. The invocation itself was historically meant to be an execution of an analysis tool but actually it can also mean fetching contents of a remote web site and returning its (parsed) contents as a result of such "invocation", or other things (access to database, or whatever).
Method Summary | |
---|---|
void |
destroy()
Destroy resources related to this job. |
long |
getCreated()
Job created - returns number of seconds from the BOE. |
long |
getElapsed()
Job time elapsed - returns number in milliseconds. |
long |
getEnded()
Job ended - returns number of seconds from the BOE. |
java.lang.String |
getId()
Get this job ID. |
java.io.File |
getJobDir()
Create (unless it already exists) and return a new directory which will become a working directory for this job. |
java.lang.String |
getLastEvent()
Get the last event. |
MetadataAccessor |
getMetadataAccessor()
Get metadata accessor. |
Reporter |
getReporter()
Get reporter. |
java.util.Map<java.lang.String,java.lang.Object> |
getResults()
Return all (available) results. |
java.util.Map<java.lang.String,java.lang.Object> |
getResults(java.lang.String[] resultNames)
Return all wanted (and available) results. |
java.util.Map<java.lang.String,java.lang.String>[] |
getResultsInfo()
|
long |
getStarted()
Job started - returns number of seconds from the BOE. |
java.lang.String |
getStatus()
Get job status. |
boolean |
isDataReferenceSafe(java.lang.String dataRef,
ParamDef paramDef)
Check if the 'dataRef' (which is a file name or a URL) is safe for this job. |
boolean |
isRecreated()
Checks if the job is re-created |
void |
run()
Run it. |
void |
setId(java.lang.String jobId)
Set this job ID. |
void |
setInputs(java.util.Map<java.lang.String,java.lang.Object> inputs)
Set input data into this job. |
void |
setInputValue(java.lang.String inputName,
java.lang.Object value)
Set one input value. |
void |
setMetadataAccessor(MetadataAccessor metadataAccessor)
Set metadata accessor. |
void |
setReporter(Reporter reporter)
Set reporter. |
void |
setSharedAttributes(java.util.Map<java.lang.String,java.lang.Object> sharedAttributes)
Shared attributes are any objects that are shared by more job instances. |
void |
terminate()
Terminate this running job. |
void |
waitFor()
Block and wait for completion. |
Method Detail |
---|
java.lang.String getId()
void setId(java.lang.String jobId)
Reporter getReporter()
void setReporter(Reporter reporter)
MetadataAccessor getMetadataAccessor()
void setMetadataAccessor(MetadataAccessor metadataAccessor)
void setInputs(java.util.Map<java.lang.String,java.lang.Object> inputs) throws SoaplabException
SoaplabException
void setInputValue(java.lang.String inputName, java.lang.Object value) throws SoaplabException
SoaplabException
void run() throws SoaplabException
SoaplabException
void waitFor() throws SoaplabException
SoaplabException
void terminate() throws SoaplabException
SoaplabException
long getCreated() throws SoaplabException
SoaplabException
long getStarted() throws SoaplabException
SoaplabException
long getEnded() throws SoaplabException
SoaplabException
long getElapsed() throws SoaplabException
SoaplabException
java.lang.String getStatus() throws SoaplabException
SoaplabException
java.lang.String getLastEvent() throws SoaplabException
SoaplabException
java.util.Map<java.lang.String,java.lang.Object> getResults() throws SoaplabException
SoaplabException
java.util.Map<java.lang.String,java.lang.Object> getResults(java.lang.String[] resultNames) throws SoaplabException
SoaplabException
java.util.Map<java.lang.String,java.lang.String>[] getResultsInfo() throws SoaplabException
SoaplabException
void destroy()
void setSharedAttributes(java.util.Map<java.lang.String,java.lang.Object> sharedAttributes)
boolean isDataReferenceSafe(java.lang.String dataRef, ParamDef paramDef)
dataRef
- is a data reference (file name, URL) to be
checked paramDef
- is a metadata definition of the input parameter
whose data reference is being checked; an implementation can
use it, for example, if inputs have different policy what is
safe and what not (but this AbstractJob class does not use it)
boolean isRecreated()
java.io.File getJobDir() throws SoaplabException
SoaplabException
- if the directory creation failed
|
Version: ${maven.project.version} | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |