Interface ItemEvent
public interface ItemEvent
Provides 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 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.
- See Also:
-
Method Summary
-
Method Details
-
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.- Returns:
- an iterator, or null.
- See Also:
-
getValue
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.
- Parameters:
name
- A Field name.- Returns:
- a String or a byte array containing the Field value, or null.
- See Also:
-