com.lightstreamer.ls_proxy
Class UpdateEvent

java.lang.Object
  extended by com.lightstreamer.ls_proxy.UpdateEvent

public abstract class UpdateEvent
extends java.lang.Object

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
abstract  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.
abstract  java.lang.String getUpdatedValue(java.lang.String fieldName)
          Gets the new value for a Field, if the Field value has just changed.
abstract  java.lang.String getValue(java.lang.String fieldName)
          Gets the current value for a Field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getItem

public 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.

Returns:
an Item instance.

getValue

public abstract 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

public abstract 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

public abstract 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.