Package com.smartgwt.client.tools.stream

# Class EventStreamData

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.tools.stream.EventStreamData

All Implemented Interfaces:
  `HasHandlers`

public class EventStreamData extends DataClass
Note: this is currently an experimental feature and not covered by normal support guarantees. See `Experimental Features` for more information.
A JavaScript object representing the state of a live `EventStream` instance, including all captured events retained by the stream. When `EventStream.end()` is called to complete capturing, a `EventStreamData` object is returned.

Note that `EventStreamData` is essentially JSON, except that dates remain JavaScript `com.smartgwt.client.util.Date`s, rather than being converted to string format. This ensures that if you `serialize` the data and then `deserialize` it, dates round trip properly and time zone information is not lost.

See Also:
  - `EventStreamEvent`
  - `Experimental Features`

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.DataClass

  `factoryCreated, factoryProperties`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EventStreamData()`
  `EventStreamData(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getEndTime()`
  A string representation of the `DateTime` when capturing for the stream was `completed`.
  `EventStreamEvent[]`
  `getEvents()`
  An array of the captured `event records` retained by the stream.
  `Integer`
  `getNEvents()`
  The total number of events captured by the stream since capturing `started`.
  `static EventStreamData`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `String`
  `getStartTime()`
  A string representation of the `DateTime` when capturing for the stream `started`.

  ### Methods inherited from class com.smartgwt.client.core.DataClass

  `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### EventStreamData

    public EventStreamData()

  - ### EventStreamData

    public EventStreamData(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static EventStreamData getOrCreateRef(JavaScriptObject jsObj)

  - ### getEndTime

    public String getEndTime()
    A string representation of the `DateTime` when capturing for the stream was `completed`.
    Returns:
      Current endTime value. Default value is null
    See Also:
      - `getStartTime()`

  - ### getEvents

    public EventStreamEvent[] getEvents()
    An array of the captured `event records` retained by the stream. Only the last `EventStream.maxSize` event records will be present, though more events may have been captured since capturing `started`.

    Note that `EventStreamData` reported via an error callback will only contain events that have occurred after the last callback, for efficiency.

    Returns:
      Current events value. Default value is null
    See Also:
      - `getNEvents()`

  - ### getNEvents

    public Integer getNEvents()
    The total number of events captured by the stream since capturing `started`. This value may exceed the length of the reported `events`, which only contains the most recent events.
    Returns:
      Current nEvents value. Default value is null

  - ### getStartTime

    public String getStartTime()
    A string representation of the `DateTime` when capturing for the stream `started`.
    Returns:
      Current startTime value. Default value is null
    See Also:
      - `getEndTime()`