public class Task extends XenAPIObject
| Modifier and Type | Class and Description |
|---|---|
static class |
Task.Record
Represents all the fields in a Task
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
ref
The XenAPI reference to this object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToOtherConfig(Connection c,
java.lang.String key,
java.lang.String value)
Add the given key-value pair to the other_config field of the given task.
|
void |
cancel(Connection c)
Request that a task be cancelled.
|
Task |
cancelAsync(Connection c)
Request that a task be cancelled.
|
static Task |
create(Connection c,
java.lang.String label,
java.lang.String description)
Create a new task object which must be manually destroyed.
|
void |
destroy(Connection c)
Destroy the task object
|
boolean |
equals(java.lang.Object obj)
If obj is a Task, compares XenAPI references for equality.
|
static java.util.Set<Task> |
getAll(Connection c)
Return a list of all the tasks known to the system.
|
java.util.Set<Types.TaskAllowedOperations> |
getAllowedOperations(Connection c)
Get the allowed_operations field of the given task.
|
static java.util.Map<Task,Task.Record> |
getAllRecords(Connection c)
Return a map of task references to task records for all tasks known to the system.
|
static java.util.Set<Task> |
getByNameLabel(Connection c,
java.lang.String label)
Get all the task instances with the given label.
|
static Task |
getByUuid(Connection c,
java.lang.String uuid)
Get a reference to the task instance with the specified UUID.
|
java.util.Date |
getCreated(Connection c)
Get the created field of the given task.
|
java.util.Map<java.lang.String,Types.TaskAllowedOperations> |
getCurrentOperations(Connection c)
Get the current_operations field of the given task.
|
java.util.Set<java.lang.String> |
getErrorInfo(Connection c)
Get the error_info field of the given task.
|
java.util.Date |
getFinished(Connection c)
Get the finished field of the given task.
|
java.lang.String |
getNameDescription(Connection c)
Get the name/description field of the given task.
|
java.lang.String |
getNameLabel(Connection c)
Get the name/label field of the given task.
|
java.util.Map<java.lang.String,java.lang.String> |
getOtherConfig(Connection c)
Get the other_config field of the given task.
|
java.lang.Double |
getProgress(Connection c)
Get the progress field of the given task.
|
Task.Record |
getRecord(Connection c)
Get a record containing the current state of the given task.
|
Host |
getResidentOn(Connection c)
Get the resident_on field of the given task.
|
java.lang.String |
getResult(Connection c)
Get the result field of the given task.
|
Types.TaskStatusType |
getStatus(Connection c)
Get the status field of the given task.
|
Task |
getSubtaskOf(Connection c)
Get the subtask_of field of the given task.
|
java.util.Set<Task> |
getSubtasks(Connection c)
Get the subtasks field of the given task.
|
java.lang.String |
getType(Connection c)
Get the type field of the given task.
|
java.lang.String |
getUuid(Connection c)
Get the uuid field of the given task.
|
int |
hashCode() |
void |
removeFromOtherConfig(Connection c,
java.lang.String key)
Remove the given key and its corresponding value from the other_config field of the given task.
|
void |
setOtherConfig(Connection c,
java.util.Map<java.lang.String,java.lang.String> otherConfig)
Set the other_config field of the given task.
|
java.lang.String |
toWireString() |
public java.lang.String toWireString()
toWireString in class XenAPIObjectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic Task.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Task getByUuid(Connection c, java.lang.String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
uuid - UUID of object to returnTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static java.util.Set<Task> getByNameLabel(Connection c, java.lang.String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
label - label of object to returnTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Set<Types.TaskAllowedOperations> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Map<java.lang.String,Types.TaskAllowedOperations> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Date getCreated(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Date getFinished(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Types.TaskStatusType getStatus(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Host getResidentOn(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.Double getProgress(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.String getType(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.String getResult(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Set<java.lang.String> getErrorInfo(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Task getSubtaskOf(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Set<Task> getSubtasks(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void setOtherConfig(Connection c, java.util.Map<java.lang.String,java.lang.String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
otherConfig - New value to setTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void addToOtherConfig(Connection c, java.lang.String key, java.lang.String value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
key - Key to addvalue - Value to addTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void removeFromOtherConfig(Connection c, java.lang.String key) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
key - Key to removeTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Task create(Connection c, java.lang.String label, java.lang.String description) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
label - short label for the new taskdescription - longer description for the new taskTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Task cancelAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationNotAllowed
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.OperationNotAllowedpublic void cancel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationNotAllowed
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.OperationNotAllowedpublic static java.util.Set<Task> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static java.util.Map<Task,Task.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcException