# Managed Object - TaskHistoryCollector(vim.TaskHistoryCollector)

Returned by
  CreateCollectorForTasks
Extends
  HistoryCollector
See also
  TaskInfo
Since
  2.0

## Managed Object Description

TaskHistoryCollector provides a mechanism for retrieving historical data and updates when the server appends new tasks.

Properties

Name | Type | Description
--- | --- | ---
latestPage* | TaskInfo[] | The items in the 'viewable latest page'. As new tasks that match the collector's TaskFilterSpec are created, they are added to this page, and the oldest tasks are removed from the collector to keep the size of the page to that allowed by SetCollectorPageSize. The "oldest task" is the one with the oldest creation time. The tasks in the returned page are unordered.
Properties inherited from HistoryCollector
filter

*May not be present

Methods

Methods defined in this Managed Object
ReadNextTasks, ReadPreviousTasks
Methods inherited from HistoryCollector
DestroyCollector, ResetCollector, RewindCollector, SetCollectorPageSize

# ReadNextTasks(readNext)

Reads the 'scrollable view' from the current position. The scrollable position is moved to the next newer page after the read. No item is returned when the end of the collector is reached.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the TaskHistoryCollector used to make the method call.
maxCount P | xsd:int | The maximum number of items in the page. Since 2.0

P Required privilege: maxCount

Return Value

Type | Description
--- | ---
TaskInfo[] |

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ReadNextTasks" type="vslm:ReadNextTasksRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ReadNextTasksResponse"> <complexType> <sequence> <element name="returnval" type="vslm:TaskInfo" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# ReadPreviousTasks(readPrev)

Reads the 'scrollable view' from the current position. The scrollable position is then moved to the next older page after the read. No item is returned when the head of the collector is reached.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the TaskHistoryCollector used to make the method call.
maxCount P | xsd:int | The maximum number of items in the page. Since 2.0

P Required privilege: maxCount

Return Value

Type | Description
--- | ---
TaskInfo[] |

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ReadPreviousTasks" type="vslm:ReadPreviousTasksRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ReadPreviousTasksResponse"> <complexType> <sequence> <element name="returnval" type="vslm:TaskInfo" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>