org.jclouds.savvis.vpdc.domain
Class Task

java.lang.Object
  extended by org.jclouds.savvis.vpdc.domain.ResourceImpl
      extended by org.jclouds.savvis.vpdc.domain.Task
All Implemented Interfaces:
Comparable<Resource>, Resource

public class Task
extends ResourceImpl

The result of a client request cannot be returned immediately, the server creates a task entity and returns its URL to the client. The client can use this URL in a subsequent GET request to obtain the current status of the task.

See Also:

Nested Class Summary
static class Task.Builder
           
static class Task.Status
           
 
Field Summary
 
Fields inherited from class org.jclouds.savvis.vpdc.domain.ResourceImpl
href, id, name, type
 
Constructor Summary
Task(String id, String name, String type, URI href, Task.Status status, Date startTime, Date endTime, Resource result, Resource owner, TaskError error)
           
 
Method Summary
static Task.Builder builder()
           
 Date getEndTime()
          date and time when the task completed.
 TaskError getError()
          error message or related information returned by the task
 Resource getOwner()
          A link to the object that owns the task.
 Resource getResult()
          Result is represent outcome of request url.
 Date getStartTime()
          date and time when the task was started.
 Task.Status getStatus()
          The current status of the task.
 Task.Builder toBuilder()
           
 String toString()
           
 
Methods inherited from class org.jclouds.savvis.vpdc.domain.ResourceImpl
compareTo, equals, getHref, getId, getName, getType, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Task

public Task(String id,
            String name,
            String type,
            URI href,
            Task.Status status,
            Date startTime,
            Date endTime,
            Resource result,
            Resource owner,
            TaskError error)
Method Detail

builder

public static Task.Builder builder()

getStatus

public Task.Status getStatus()
The current status of the task.


getStartTime

public Date getStartTime()
date and time when the task was started.


getEndTime

@Nullable
public Date getEndTime()
date and time when the task completed. Does not appear for running tasks.


getOwner

@Nullable
public Resource getOwner()
A link to the object that owns the task. For copy operations, the owner is the copy that is being created. For delete operations, the owner is the deleted object, so this element is not included. For all other operations, the owner is the object to which the request was made.


getResult

@Nullable
public Resource getResult()
Result is represent outcome of request url. if any VM related operation, the result will present as get VApp. if any VMDK related operation, the result will present as get VMKD


getError

@Nullable
public TaskError getError()
error message or related information returned by the task


toBuilder

public Task.Builder toBuilder()
Overrides:
toBuilder in class ResourceImpl

toString

public String toString()
Overrides:
toString in class ResourceImpl


Copyright © 2009-2012 jclouds. All Rights Reserved.