|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.evolveum.midpoint.task.impl.TaskImpl
public class TaskImpl
Implementation of a Task. This is very simplistic now. It does not even serialize itself.
TaskManagerImpl| Method Summary | ||
|---|---|---|
boolean |
canRun()
Returns true if the task can run (was not interrupted). |
|
void |
close(OperationResult parentResult)
Close the task. |
|
java.lang.String |
dump()
Return human-readable representation of the task content. |
|
boolean |
equals(java.lang.Object obj)
|
|
void |
finishHandler()
Marks current handler as finished, and removes it from the handler stack. |
|
TaskBinding |
getBinding()
|
|
TaskExclusivityStatus |
getExclusivityStatus()
Returns task exclusivity status. |
|
TaskExecutionStatus |
getExecutionStatus()
Returns execution status. |
|
PropertyContainer |
getExtension()
Returns task extension. |
|
Property |
getExtension(javax.xml.namespace.QName propertyName)
|
|
java.lang.String |
getHandlerUri()
Returns handler URI. |
|
java.lang.Long |
getLastRunFinishTimestamp()
|
|
java.lang.Long |
getLastRunStartTimestamp()
|
|
java.lang.String |
getName()
Returns human-readable name of the task. |
|
java.lang.Long |
getNextRunStartTime()
|
|
|
getObject(java.lang.Class<T> type,
OperationResult parentResult)
Returns object that the task is associated with. |
|
java.lang.String |
getObjectOid()
Returns OID of the object that the task is associated with. |
|
ObjectReferenceType |
getObjectRef()
Returns reference to the object that the task is associated with. |
|
java.lang.String |
getOid()
Returns task OID. |
|
UriStack |
getOtherHandlersUriStack()
Returns the stack of other handlers URIs. |
|
UserType |
getOwner()
Returns user that owns this task. |
|
TaskPersistenceStatus |
getPersistenceStatus()
Returns task persistence status. |
|
long |
getProgress()
|
|
OperationResult |
getResult()
Returns a top-level OperationResult stored in the task. |
|
ScheduleType |
getSchedule()
|
|
java.lang.String |
getTaskIdentifier()
Returns task (lightweight) identifier. |
|
TaskType |
getTaskTypeObject()
|
|
int |
hashCode()
|
|
boolean |
isAsynchronous()
Returns true if the task is asynchronous. |
|
boolean |
isCycle()
|
|
boolean |
isLooselyBound()
|
|
boolean |
isSingle()
|
|
boolean |
isTightlyBound()
|
|
void |
makeRecurrent(long interval)
|
|
void |
modifyExtension(java.util.List<PropertyModification> modifications,
OperationResult parentResult)
TODO The modification path is relative to the extension, therefore it will almost always be "." (or null). |
|
void |
recordProgress(long progress,
OperationResult parentResult)
Record progress of the task, storing it persistently if needed. |
|
void |
recordRunFinish(TaskRunResult runResult,
OperationResult parentResult)
Record finish of the last "run" of the task TODO: better documentation |
|
void |
recordRunStart(OperationResult parentResult)
|
|
void |
refresh(OperationResult parentResult)
Re-reads the task state from the persistent storage. |
|
void |
setExclusivityStatus(TaskExclusivityStatus exclusivityStatus)
Sets task exclusivity status. |
|
void |
setExecutionStatus(TaskExecutionStatus executionStatus)
Sets task execution status. |
|
void |
setHandlerUri(java.lang.String handlerUri)
Sets handler URI. |
|
void |
setName(java.lang.String name)
Sets the human-readable name of the task. |
|
void |
setObjectRef(ObjectReferenceType objectRef)
|
|
void |
setOid(java.lang.String oid)
Sets task OID. |
|
void |
setOwner(UserType owner)
|
|
void |
setPersistenceStatus(TaskPersistenceStatus persistenceStatus)
Sets task persistence status. |
|
void |
setResult(OperationResult result)
|
|
void |
shutdown()
Signal the task to shut down. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String getTaskIdentifier()
Task
getTaskIdentifier in interface Taskpublic UserType getOwner()
Task
getOwner in interface Taskpublic void setOwner(UserType owner)
setOwner in interface Taskpublic TaskExecutionStatus getExecutionStatus()
Task
getExecutionStatus in interface TaskTaskExecutionStatuspublic TaskPersistenceStatus getPersistenceStatus()
Task
getPersistenceStatus in interface TaskTaskPersistenceStatuspublic TaskExclusivityStatus getExclusivityStatus()
Task
getExclusivityStatus in interface TaskTaskExclusivityStatuspublic TaskBinding getBinding()
getBinding in interface Taskpublic boolean isAsynchronous()
Task
isAsynchronous in interface Taskpublic long getProgress()
getProgress in interface Taskpublic ObjectReferenceType getObjectRef()
Task
getObjectRef in interface Taskpublic void setObjectRef(ObjectReferenceType objectRef)
setObjectRef in interface Taskpublic java.lang.String getObjectOid()
Task
getObjectOid in interface Task
public <T extends ObjectType> T getObject(java.lang.Class<T> type,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
Task
getObject in interface TaskObjectNotFoundException
SchemaExceptionpublic OperationResult getResult()
Task
getResult in interface Taskpublic void setResult(OperationResult result)
public java.lang.String getHandlerUri()
Task
getHandlerUri in interface Taskpublic void setHandlerUri(java.lang.String handlerUri)
Task
setHandlerUri in interface TaskhandlerUri - new handler URIpublic UriStack getOtherHandlersUriStack()
Task
getOtherHandlersUriStack in interface Taskpublic void setExecutionStatus(TaskExecutionStatus executionStatus)
Task
setExecutionStatus in interface TaskexecutionStatus - new task execution status.TaskExecutionStatuspublic void setPersistenceStatus(TaskPersistenceStatus persistenceStatus)
Task
setPersistenceStatus in interface TaskpersistenceStatus - new task persistence status.TaskPersistenceStatuspublic void setExclusivityStatus(TaskExclusivityStatus exclusivityStatus)
Task
setExclusivityStatus in interface TaskexclusivityStatus - new task exclusivity status.TaskExclusivityStatuspublic java.lang.String getOid()
Task
getOid in interface Taskpublic void setOid(java.lang.String oid)
Task
setOid in interface Taskoid - new task OID.public java.lang.String getName()
Task
getName in interface Taskpublic void setName(java.lang.String name)
Task
setName in interface Taskname - new human-readable name of the task.public PropertyContainer getExtension()
Task
getExtension in interface Taskpublic Property getExtension(javax.xml.namespace.QName propertyName)
getExtension in interface Task
public void modifyExtension(java.util.List<PropertyModification> modifications,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
Task
modifyExtension in interface TaskObjectNotFoundException
SchemaExceptionpublic TaskType getTaskTypeObject()
getTaskTypeObject in interface Taskpublic java.lang.Long getLastRunStartTimestamp()
getLastRunStartTimestamp in interface Taskpublic java.lang.Long getLastRunFinishTimestamp()
getLastRunFinishTimestamp in interface Taskpublic java.lang.Long getNextRunStartTime()
getNextRunStartTime in interface Taskpublic java.lang.String dump()
Task
dump in interface Taskdump in interface Dumpable
public void recordRunStart(OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
recordRunStart in interface TaskObjectNotFoundException
SchemaException
public void recordRunFinish(TaskRunResult runResult,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
Task
recordRunFinish in interface TaskrunResult - result of the run to record
ObjectNotFoundException
SchemaException
public void recordProgress(long progress,
OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
Task
recordProgress in interface TaskObjectNotFoundException
SchemaException
public void refresh(OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
Task
refresh in interface TaskObjectNotFoundException
SchemaException
public void close(OperationResult parentResult)
throws ObjectNotFoundException,
SchemaException
Task
close in interface TaskObjectNotFoundException
SchemaExceptionpublic boolean isSingle()
isSingle in interface Taskpublic boolean isCycle()
isCycle in interface Taskpublic boolean isTightlyBound()
isTightlyBound in interface Taskpublic boolean isLooselyBound()
isLooselyBound in interface Taskpublic ScheduleType getSchedule()
getSchedule in interface Taskpublic void shutdown()
Task
shutdown in interface Taskpublic boolean canRun()
Task
canRun in interface Taskpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic void makeRecurrent(long interval)
public void finishHandler()
Task
finishHandler in interface Task
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||