com.lightstreamer.interfaces.metadata
Interface ItemEvent

All Known Subinterfaces:
CustomizableItemEvent

public interface ItemEvent

Used to provide update informations to the calls to the isSelected method of MetadataProvider. Contains an update event for an Item, as dispatched by the Preprocessor in order to be processed by an ItemEventBuffer. All the fields pertaining to the updated Item state are reported, regardless that they are changing or confirmed with the event.


Method Summary
 byte[] getValueAsByteArray(java.lang.String fieldName)
          Returns the value of a named Field as a byte array (null is a legal value too).
 java.lang.String getValueAsString(java.lang.String fieldName)
          Returns the value of a named Field as a String object (null is a legal value too).
 boolean isSnapshot()
          Allows to distinguish between events that carry the Item initial state (the Snapshot) and events that carry state Updates.
 

Method Detail

getValueAsString

java.lang.String getValueAsString(java.lang.String fieldName)
Returns the value of a named Field as a String object (null is a legal value too). Returns null if the Field is not part of the current Item state. Getting the String value of a Field may involve a conversion operation, in case the Data Adapter supplied the field value as a byte array.

Parameters:
fieldName - A Field name.
Returns:
a String containing the Field value, or null.

getValueAsByteArray

byte[] getValueAsByteArray(java.lang.String fieldName)
Returns the value of a named Field as a byte array (null is a legal value too). Returns null if the Field is not part of the current Item state. Getting the byte array value of a Field may involve a conversion operation, in case the Data Adapter supplied the field value as a String.

Parameters:
fieldName - A Field name.
Returns:
a byte array containing the Field value, or null.

isSnapshot

boolean isSnapshot()
Allows to distinguish between events that carry the Item initial state (the Snapshot) and events that carry state Updates.

Returns:
true if the event carries initial state informations.