# Managed Object - EventHistoryCollector(vim.event.EventHistoryCollector)

Returned by
  CreateCollectorForEvents
Extends
  HistoryCollector
See also
  Event

## Managed Object Description

EventHistoryCollector provides a mechanism for retrieving historical data and updates when the server appends new events.

Properties

Name | Type | Description
--- | --- | ---
latestPage* | Event[] | The items in the 'viewable latest page'. As new events that match the collector's EventFilterSpec are created, they are added to this page, and the oldest events are removed from the collector to keep the size of the page to that allowed by HistoryCollector#setLatestPageSize. The "oldest event" is the one with the smallest key (event ID). The events in the returned page are unordered.
Properties inherited from HistoryCollector
filter

*May not be present

Methods

Methods defined in this Managed Object
ReadNextEvents, ReadPreviousEvents
Methods inherited from HistoryCollector
DestroyCollector, ResetCollector, RewindCollector, SetCollectorPageSize

# ReadNextEvents(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 EventHistoryCollector used to make the method call.
maxCount | xsd:int | The maximum number of items in the page.

Return Value

Type | Description
--- | ---
Event[] |

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if maxCount is out of range.
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:sms="urn:sms" name="ReadNextEvents" type="sms:ReadNextEventsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="ReadNextEventsResponse"> <complexType> <sequence> <element name="returnval" type="sms:Event" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# ReadPreviousEvents(readPrev)

Reads the 'scrollable view' from the current position. The scrollable position is 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 EventHistoryCollector used to make the method call.
maxCount | xsd:int | The maximum number of items in the page.

Return Value

Type | Description
--- | ---
Event[] |

Faults

Type | Description
--- | ---
InvalidArgument | Thrown if maxCount is out of range.
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:sms="urn:sms" name="ReadPreviousEvents" type="sms:ReadPreviousEventsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="ReadPreviousEventsResponse"> <complexType> <sequence> <element name="returnval" type="sms:Event" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>