|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UpdateListener
Receives Snapshots and Updates about Item values and subscription errors. All notifications are received while holding the lock to the overall subscription state, so that the notified informations are always up to date during the listener methods execution. For this same reason, however, the listener methods execution must be fast and must not be blocking. Moreover, as a general rule, reentrant calls to LSProxy during the listener methods execution are not allowed, but for subscription and unsubscription requests that don't involve the Item that is being notified (this simplifies implementation of a two level push mechanism, in which some Fields of one Item carry the names of related Items to subscribe).
Method Summary | |
---|---|
void |
onException(Item item,
PushException e)
Notifies an error in the subscription of an Item to Lightstreamer Server or in data reception from the Server. |
void |
onException(Item item,
RequestException e)
Notifies an error in a subscription or unsubscription request for an Item. |
void |
onLostUpdates(Item item,
int lostUpdates)
Notifies that some Updates for a RAW or COMMAND Item (or MERGE or DISTINCT Item with unfiltered dispatching requested) have been lost (for COMMAND mode with filtering allowed, this applies to ADD and DELETE events only). |
void |
onSnapshotEnd(Item item)
Signals the completion of the Snapshot for an Item that has been previously subscribed with DISTINCT (provided that a snapshot length has been specified) or COMMAND (with filtering allowed) subscription mode. |
void |
update(UpdateEvent event)
Brings Snapshots or notifies Updates for a previously subscribed Item. |
Method Detail |
---|
void update(UpdateEvent event)
event
- carries values update information.void onSnapshotEnd(Item item)
item
- the involved Item. The 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.void onLostUpdates(Item item, int lostUpdates)
item
- the involved Item. The 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.lostUpdates
- the number of lost updates. A 0 value means that
the real number could not be determined (and may as well be 0), as in
the case of a forced reconnection to the Server. A -1 value extends the
0 case and means that the real number may be negative as well (possible
for DISTINCT items, when a new snapshot may bring events that have been
already received).void onException(Item item, RequestException e)
item
- the involved Item. The 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.e
- the specification of the error that has occurred.void onException(Item item, PushException e)
item
- the involved Item. The 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.e
- the specification of the error that has occurred.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |