com.lightstreamer.ls_proxy
Interface UpdateEvent


public interface UpdateEvent

Carries values Snapshot and Update informations for an Item. Changed and unchanged values are distinguished. Updates for all currently subscribed Fields are always reported.


Method Summary
 java.lang.String[] getFieldNames()
          Gets the set of Fields whose value informations are carried.
 Item getItem()
          Gets the subscription Item involved in the Update event.
 java.lang.String getUpdatedValue(java.lang.String fieldName)
          Gets the new value for a Field, if the Field value has just changed.
 java.lang.String getValue(java.lang.String fieldName)
          Gets the current value for a Field.
 

Method Detail

getItem

Item getItem()
Gets the subscription Item involved in the Update event. The Item instance returned may not be the same instance that was used in the subscription, but it will be equal to it. The object is currently stored internally, thus it should not be modified.

Returns:
an Item instance.

getValue

java.lang.String getValue(java.lang.String fieldName)
Gets the current value for a Field. For MERGE Items, due to sharing of subscriptions, the Snapshot and the very first Updates may contain unknown fields. If this behavior is unacceptable, sharing can be prevented on such subscription Items by setting them as unique.

Parameters:
fieldName - name of a Field; it is not forced to be a subscribed field.
Returns:
current value of the Field; it can be null, as null is a legal value for a field; it is also null if the field value is still unknown.
See Also:
Item

getUpdatedValue

java.lang.String getUpdatedValue(java.lang.String fieldName)
Gets the new value for a Field, if the Field value has just changed. If the Field value is still unknown, its changed value will be unknown as well.

Parameters:
fieldName - name of a Field; it is not forced to be a subscribed field.
Returns:
new value of the Field or null if the Field value has not changed with the current Update. As null is a legal value for a field, it can be null also if the Field value is null; it is also null if the field value is still unknown.

getFieldNames

java.lang.String[] getFieldNames()
Gets the set of Fields whose value informations are carried.

Returns:
an array of Field names; the names order is unimportant.