|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xensource.xenapi.XenAPIObject
com.xensource.xenapi.Task
public class Task
A long-running asynchronous task
Nested Class Summary | |
---|---|
static class |
Task.Record
Represents all the fields in a Task |
Field Summary | |
---|---|
protected String |
ref
The XenAPI reference to this object. |
Method Summary | |
---|---|
void |
addToOtherConfig(Connection c,
String key,
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,
String label,
String description)
Create a new task object which must be manually destroyed. |
void |
destroy(Connection c)
Destroy the task object |
boolean |
equals(Object obj)
If obj is a Task, compares XenAPI references for equality. |
static Set<Task> |
getAll(Connection c)
Return a list of all the tasks known to the system. |
Set<Types.TaskAllowedOperations> |
getAllowedOperations(Connection c)
Get the allowed_operations field of the given task. |
static Map<Task,Task.Record> |
getAllRecords(Connection c)
Return a map of task references to task records for all tasks known to the system. |
static Set<Task> |
getByNameLabel(Connection c,
String label)
Get all the task instances with the given label. |
static Task |
getByUuid(Connection c,
String uuid)
Get a reference to the task instance with the specified UUID. |
Date |
getCreated(Connection c)
Get the created field of the given task. |
Map<String,Types.TaskAllowedOperations> |
getCurrentOperations(Connection c)
Get the current_operations field of the given task. |
Set<String> |
getErrorInfo(Connection c)
Get the error_info field of the given task. |
Date |
getFinished(Connection c)
Get the finished field of the given task. |
String |
getNameDescription(Connection c)
Get the name/description field of the given task. |
String |
getNameLabel(Connection c)
Get the name/label field of the given task. |
Map<String,String> |
getOtherConfig(Connection c)
Get the other_config field of the given task. |
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. |
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. |
Set<Task> |
getSubtasks(Connection c)
Get the subtasks field of the given task. |
String |
getType(Connection c)
Get the type field of the given task. |
String |
getUuid(Connection c)
Get the uuid field of the given task. |
int |
hashCode()
|
void |
removeFromOtherConfig(Connection c,
String key)
Remove the given key and its corresponding value from the other_config field of the given task. |
void |
setOtherConfig(Connection c,
Map<String,String> otherConfig)
Set the other_config field of the given task. |
String |
toWireString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String ref
Method Detail |
---|
public String toWireString()
toWireString
in class XenAPIObject
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Task.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Task getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
uuid
- UUID of object to return
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Set<Task> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
label
- label of object to return
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Set<Types.TaskAllowedOperations> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Map<String,Types.TaskAllowedOperations> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Date getCreated(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Date getFinished(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Types.TaskStatusType getStatus(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Host getResidentOn(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Double getProgress(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getType(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public String getResult(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Set<String> getErrorInfo(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Map<String,String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Task getSubtaskOf(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Set<Task> getSubtasks(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void setOtherConfig(Connection c, Map<String,String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
otherConfig
- New value to set
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void addToOtherConfig(Connection c, String key, String value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
key
- Key to addvalue
- Value to add
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void removeFromOtherConfig(Connection c, String key) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
key
- Key to remove
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Task create(Connection c, String label, String description) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
label
- short label for the new taskdescription
- longer description for the new task
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public Task cancelAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationNotAllowed
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.OperationNotAllowed
public void cancel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.OperationNotAllowed
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
Types.OperationNotAllowed
public static Set<Task> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
public static Map<Task,Task.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |