use of com.cloud.async.AsyncJob in project CloudStack-archive by CloudStack-extras.
the class ListAsyncJobsCmd method execute.
@Override
public void execute() {
List<? extends AsyncJob> result = _mgr.searchForAsyncJobs(this);
ListResponse<AsyncJobResponse> response = new ListResponse<AsyncJobResponse>();
List<AsyncJobResponse> jobResponses = new ArrayList<AsyncJobResponse>();
for (AsyncJob job : result) {
jobResponses.add(_responseGenerator.createAsyncJobResponse(job));
}
response.setResponses(jobResponses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
Aggregations