public interface ItemEventProvides to the Data Adapter a base interface for creating ItemEvents in order to send updates to Lightstreamer Kernel. An ItemEvent object contains the new values and, in some cases, the current values of the Fields of an Item. The interfaces OldItemEvent, 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 must execute fast and must be nonblocking. All information needed to extract data must be provided at object construction. If the implementation were slow, the whole update delivery process, even for different sessions, would be slowed down.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
getNames()Returns an iterator to browse the names of the supplied Fields, expressed as String.
getValue(java.lang.String name)Returns the value of a named Field (null is a legal value too).
@Nullable java.util.Iterator getNames()Returns an iterator to browse the names of the supplied Fields, expressed as String. If the Item to which this ItemEvent refers has been subscribed by setting the needsIterator flag as false, the method can return a null value.
- an iterator, or null.
- See Also:
@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 also if the Field is not reported in the ItemEvent.
Any value can be expressed as either a byte array or a String:
- If a value is supplied as a byte array, it will be considered as an ISO-8859-1 (ISO-LATIN-1) representation of a string, so that the clients will be able to receive the value as a string object. A special case is that of binary representations of AMF objects, which can be received by the Flex Client Library in binary form. As another special case, the mandatory fields for COMMAND Mode, named "key" and "command", cannot be supplied as byte arrays.
- If a value is supplied as a String, it will be received as an equivalent string object by the client. This, however, involves an internal conversion to a byte array in order to send the update; this makes supplying values as String less efficient than supplying them as byte arrays, though the latter method is restricted to the ISO-8859-1 (ISO-LATIN-1) character set.
name- A Field name.
- a String or a byte array containing the Field value, or null.
- See Also: