public abstract class AbstractTask extends AbstractExecutableObject implements Task
Title: Service Event Fabric Core
Description: Defines a task managed by the Scheduled Job.
Copyright: Copyright (c) 2019
Company: StreamScape Technologies
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractTask.ListenerHelper |
START_TASK_NAME, START_TASK_OID
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
void |
doDisableResumptionOn(byte state) |
boolean |
equals(java.lang.Object other) |
java.lang.String |
getAfterTaskName()
Returns a name of the task the current task will be executed after.
|
java.util.UUID |
getAfterTaskOID()
Returns a unique identifier of the task the current task will be executed after.
|
java.lang.String |
getAuthor()
Returns a name of the user that created this object.
|
Task |
getConsequent()
Returns a task executed after the current task.
|
java.util.Date |
getCreationTime()
Returns a timestamp indicating when the object was created.
|
java.lang.String |
getDescription()
Returns a description of the object.
|
ExceptionTask |
getExceptionTask()
Returns the Exception Task associated with this task.
|
TaskExecution |
getExecution()
Returns an object containing information about the current execution of the task.
|
java.util.Date |
getLastUpdateTime()
Returns a timestamp indicating when the object was updated last time.
|
java.lang.String |
getName()
Returns a name of the object.
|
java.util.UUID |
getOID()
Returns an unique identifier of the object.
|
int |
getOrder()
Returns an order of the task in the execution chain of the task list (indexing starts with
1 ). |
java.lang.String |
getOwner()
Returns a name of the owner (user or group) of the object.
|
Task |
getPrecedent()
Returns a task after which the current task will be executed.
|
RuleSet |
getRuleSet()
Returned thr Rule Set assigned to this task.
|
TaskState |
getState()
Returns a state of the task.
|
TaskList |
getTaskList()
Returns the task list that holds this task.
|
java.lang.Long |
getTaskWindow()
Returns a time interval available for execution of the task.
|
java.util.concurrent.TimeUnit |
getTaskWindowUnit()
Returns a time unit for the
taskWindow parameter. |
double |
getWeight()
Returns a weight of the task.
|
boolean |
isResumptionEnabledOn(TaskState state)
Checks if the specified state is marked as a 'resuming' state for this task.
|
boolean |
isResumptionEnabledTotally()
Checks if each supported task state is marked as a 'resuming' state.
|
java.util.List |
listResumptionStates()
Returns a list of states that are marked as 'resuming' states for this task.
|
void |
setAfterTask(java.lang.String taskName)
Sets a name of the task the current task will be executed after.
|
void |
setDescription(java.lang.String description)
Sets the specified description of the object.
|
void |
setName(java.lang.String name)
Sets the specified object name.
|
void |
setWeight(byte weight)
Sets the specified weight of the task.
|
java.lang.String |
toString() |
addTag, clearProperties, clearTags, disableResumptionOn, disableResumptionTotally, enableResumptionOn, enableResumptionTotally, existsProperty, existsTag, getEndTimeMsec, getExpirationDate, getMetadata, getProperties, getProperty, getPropertyList, getPropertyResolved, isAutoComplete, listProperties, listTags, putProperty, removeProperty, removeTag, setMetadata, setTaskWindow, setTaskWindowUnit
clone, getSerialVersionUID
getClass, hashCode, notify, notifyAll, wait, wait, wait
disableResumptionOn, disableResumptionTotally, enableResumptionOn, enableResumptionTotally, getFullName, getType, isAutoComplete, listEventIds, setTaskWindow, setTaskWindowUnit, undo, undo
addTag, clearProperties, clearTags, existsProperty, existsTag, getEndTimeMsec, getExpirationDate, getMetadata, getProperties, getProperty, getPropertyList, getPropertyResolved, listTags, putProperty, removeProperty, removeTag, setMetadata
getAuthor, getCreationTime, getLastUpdateTime, getOID
getDescription, setDescription, setName
getName
public java.lang.String getOwner()
SchedulerObject
getOwner
in interface SchedulerObject
getOwner
in interface Task
public TaskList getTaskList()
Task
This method returns null
if the object is deserialized from any format (for example, on the remote side).
getTaskList
in interface Task
public java.util.UUID getAfterTaskOID()
Task
Task.setAfterTask(String)
for further information.getAfterTaskOID
in interface Task
public java.lang.String getAfterTaskName()
Task
Task.setAfterTask(String)
for further information.
This method MUST NOT be used if the task is deserialized from any format (for example, on the remote side).
Use Task.getAfterTaskOID()
instead.
getAfterTaskName
in interface Task
public void setAfterTask(java.lang.String taskName) throws SchedulerException
Task
taskName
is null
the existing State Transition is removed.
Task.START_TASK_NAME
should be used to create a starting State Transition.setAfterTask
in interface Task
taskName
- the name of the task the current task will be executed after.SchedulerException
- if the specified task does not exist or
if the State Transition being created is invalid.public Task getPrecedent()
Task
null
is returned.getPrecedent
in interface Task
public Task getConsequent()
Task
null
is returned.getConsequent
in interface Task
public java.lang.Long getTaskWindow()
Task
getTaskWindow
in interface Task
public java.util.concurrent.TimeUnit getTaskWindowUnit()
Task
taskWindow
parameter.
TimeUnit.SECONDS
.getTaskWindowUnit
in interface Task
taskWindow
parameter.public void doDisableResumptionOn(byte state)
public boolean isResumptionEnabledOn(TaskState state)
Task
Task.enableResumptionOn(TaskState)
for further details.isResumptionEnabledOn
in interface Task
state
- the state to be checked.true
if the specified state is allowed for resumption of the chain, false
otherwise.public boolean isResumptionEnabledTotally()
Task
Task.enableResumptionOn(TaskState)
for further details.isResumptionEnabledTotally
in interface Task
true
if each supported task state is allowed for resumption of the chain, false
otherwise.public java.util.List listResumptionStates()
Task
Task.enableResumptionOn(TaskState)
for further details.listResumptionStates
in interface Task
public double getWeight()
Task
public void setWeight(byte weight) throws SchedulerException
Task
setWeight
in interface Task
weight
- the weight to be set.SchedulerException
- if the specified weight has a wrong value or
if the operation is not supported.public TaskState getState()
Task
public TaskExecution getExecution()
Task
null
.getExecution
in interface Task
null
if the task is not currently running.public RuleSet getRuleSet()
Task
getRuleSet
in interface Task
public ExceptionTask getExceptionTask()
Task
null
if the task is an Exception Task itself.getExceptionTask
in interface Task
public int getOrder()
Task
1
).
-1
if the task list is not enabled or is in UNORDERED
mode.
This method MUST NOT be used if the task is deserialized from any format (for example, on the remote side).
Use TaskList.getTaskOrder(String)
instead.
public java.lang.String toString()
public java.util.UUID getOID()
SchedulerObject
getOID
in interface SchedulerObject
public java.lang.String getName()
NamedObject
getName
in interface NamedObject
public void setName(java.lang.String name) throws SchedulerException
DescribedNamedObject
setName
in interface DescribedNamedObject
name
- the name to be set.SchedulerException
- if the name has wrong format.public java.lang.String getDescription()
DescribedNamedObject
getDescription
in interface DescribedNamedObject
public void setDescription(java.lang.String description)
DescribedNamedObject
setDescription
in interface DescribedNamedObject
description
- the value to be set.public java.lang.String getAuthor()
SchedulerObject
getAuthor
in interface SchedulerObject
public java.util.Date getCreationTime()
SchedulerObject
getCreationTime
in interface SchedulerObject
public java.util.Date getLastUpdateTime()
SchedulerObject
getLastUpdateTime
in interface SchedulerObject
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.