Package com.onenetwork.platform.ixm
Class TaskInfo
java.lang.Object
com.onenetwork.platform.ixm.TaskInfo
public class TaskInfo
extends java.lang.Object
Encapsulates the information necessary to create task for invoking IXM Engines. This
includes task parameters, task dependencies, etc.
-
Constructor Summary
Constructors Constructor Description TaskInfo()
-
Method Summary
Modifier and Type Method Description java.lang.Long
getJobDepend()
Sets the job depends.int
getJobSequence()
Zero by default; can be set sequentially starting from zero to group TaskInfos into separate jobs.java.lang.String
getListenerClass()
int
getMaxAttempts()
Returns the max allowable attempts for this taskorg.json.JSONObject
getParams()
Returns the parameters that are required to execute this taskjava.lang.String
getTag1()
Get tag1.java.lang.String
getTag2()
Get tag2.java.lang.String
getTag3()
Get tag3.java.lang.String
getTag4()
Get tag4.TaskInfo
getTaskDependency()
Returns another task on which this task depends.void
setJobDepend(java.lang.Long jobDepend)
Sets the job depends.void
setJobSequence(int jobIndex)
Sets the job sequence.void
setListenerClass(java.lang.String listenerClass)
void
setMaxAttempts(int maxAttempts)
Sets the max allowable attempts for this taskvoid
setParams(org.json.JSONObject params)
Sets the parameters that are required to execute this taskvoid
setTag1(java.lang.String tag1)
Sets tag1.void
setTag2(java.lang.String tag2)
Sets tag2.void
setTag3(java.lang.String tag3)
Sets tag3.void
setTag4(java.lang.String tag4)
Sets tag4.void
setTaskDependency(TaskInfo taskDependency)
Sets another task on which this task depends.
-
Constructor Details
-
TaskInfo
public TaskInfo()
-
-
Method Details
-
getTaskDependency
Returns another task on which this task depends. -
setTaskDependency
Sets another task on which this task depends.- Parameters:
taskDependency
- task upon which this task should depend
-
getParams
public org.json.JSONObject getParams()Returns the parameters that are required to execute this task -
setParams
public void setParams(org.json.JSONObject params)Sets the parameters that are required to execute this task- Parameters:
params
- the parameters that are required to execute this task
-
getJobSequence
public int getJobSequence()Zero by default; can be set sequentially starting from zero to group TaskInfos into separate jobs.- Returns:
- job sequence, from zero ascending
-
setJobSequence
public void setJobSequence(int jobIndex)Sets the job sequence. Zero by default; can be set sequentially starting from zero to group TaskInfos into separate jobs. This cannot be called if a job depends has already been set.- Parameters:
jobIndex
- from zero ascending to divide tasks into different jobs
-
getJobDepend
public java.lang.Long getJobDepend()Sets the job depends. Null by default. If set, it will force this task to wait until the job with the specified id has completed.- Returns:
- id of the job to depend on, or null if this task does not depend on a job
-
setJobDepend
public void setJobDepend(java.lang.Long jobDepend)Sets the job depends. Null by default. If set, it will force this task to wait until the job with the specified id has completed. This cannot be called if job sequence is not 0.- Parameters:
jobDepend
- the id of the job to depend on
-
getTag1
public java.lang.String getTag1()Get tag1. Null by default. Useful for identifying task by indexable field.- Returns:
- String tag1
-
setTag1
public void setTag1(java.lang.String tag1)Sets tag1. Null by default.- Parameters:
tag1
-
-
getTag2
public java.lang.String getTag2()Get tag2. Null by default. Useful for identifying task by indexable field.- Returns:
- String tag2
-
setTag2
public void setTag2(java.lang.String tag2)Sets tag2. Null by default.- Parameters:
tag2
-
-
getTag3
public java.lang.String getTag3()Get tag3. Null by default. Useful for identifying task by indexable field.- Returns:
- String tag3
-
setTag3
public void setTag3(java.lang.String tag3)Sets tag3. Null by default.- Parameters:
tag3
-
-
getTag4
public java.lang.String getTag4()Get tag4. Null by default. Useful for identifying task by indexable field.- Returns:
- String tag4
-
setTag4
public void setTag4(java.lang.String tag4)Sets tag4. Null by default.- Parameters:
tag4
-
-
getMaxAttempts
public int getMaxAttempts()Returns the max allowable attempts for this task -
setMaxAttempts
public void setMaxAttempts(int maxAttempts)Sets the max allowable attempts for this task- Parameters:
maxAttempts
- max allowable attempts for this task
-
getListenerClass
public java.lang.String getListenerClass()- Returns:
- the listenerClass
-
setListenerClass
public void setListenerClass(java.lang.String listenerClass)- Parameters:
listenerClass
- the listenerClass to set
-