public interface Task
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String key)
Retrieve the attribute value by the attribute name.
|
Map<String,Object> |
getAttributeMap()
Returns attribute map which is unmodifiable.
|
Enumeration<String> |
getAttributeNames()
Enumerates the attribute names
|
Collection<Task> |
getChildTasks()
Returns the child tasks collection
|
long |
getDurationTimeMillis()
Returns the task execution duration time in milliseconds
|
String |
getName()
returns the task name
|
Task |
getParentTask() |
boolean |
isRunning()
Returns true if the task was started but not stopped.
|
Object |
removeAttribute(String key)
Removes the attribute by the attribute name.
|
void |
setAttribute(String key,
Object value)
Set an attribute for the task.
|
Task |
startSubtask(String name)
Starts and returns a child subtask with the name.
|
void |
stop()
Stops the task
|
String getName()
Map<String,Object> getAttributeMap()
Enumeration<String> getAttributeNames()
void setAttribute(String key, Object value)
value
should have a proper #toString method
as by default, the #toString method is used for displaying the object in the diagnostics.key
- attribute namevalue
- attribute valueObject getAttribute(String key)
null
is returnedObject removeAttribute(String key)
key
, this object is returned. Otherwise null
is returned.Task getParentTask()
null
if this is the root taskTask startSubtask(String name)
name
- void stop()
Collection<Task> getChildTasks()
boolean isRunning()
long getDurationTimeMillis()
Copyright © 2012–2015 Hippo B.V. (http://www.onehippo.com). All rights reserved.