Interface ItemEvent


public interface ItemEvent
Provides to the Data Adapter a base interface for creating Item Events in order to send updates to Lightstreamer Kernel. An Item Event object contains the new values and, in some cases, the current values of the Fields of an Item. The interfaces IndexedItemEvent and java.util.Map may also be used to define events. Events of all these kinds may be freely mixed, even if they belong to the same Item. All implementation methods should be nonblocking.
  • Method Summary

    Modifier and Type Method Description
    java.util.Iterator<java.lang.String> getNames()
    Returns an Iterator to browse the names of the supplied Fields, expressed as String.
    java.lang.Object getValue​(java.lang.String name)
    Returns the value of a named Field (null is a legal value too).
  • Method Details

    • getNames

      @Nonnull java.util.Iterator<java.lang.String> getNames()
      Returns an Iterator to browse the names of the supplied Fields, expressed as String.
      Returns:
      an Iterator to browse the names of the supplied Fields.
    • getValue

      @Nullable java.lang.Object getValue​(@Nonnull java.lang.String name)
      Returns the value of a named Field (null is a legal value too). Returns null if the Field is not reported in the Item Event. The value can be expressed as either a String or a byte array, the latter case being the most efficient, though restricted to the ISO-8859-1 (ISO-LATIN-1) character set. Lightstreamer Kernel, through the Remote Server, will call this method at most once for each Field (unless events logging is enabled) and may not call this method at all for some Fields. So, if performing any data conversion is required in order to extract Field values, it may be convenient to do it on demand rather than doing it in advance.
      Parameters:
      name - A Field name.
      Returns:
      A String or a byte array containing the Field value, or null.