it.list.jft.event
Interface SubscriptionNotifyEvent

All Superinterfaces:
Event, SubscriptionEvent

public interface SubscriptionNotifyEvent
extends SubscriptionEvent

Event generated when an actual or historical data or a server-answer to Subscription.refreshEntity() is available.

This event must be handled by SubscriptionListener.onSubscriptionNotify().

With this event the server result is always Event.RESULT_OK.


Field Summary
static int ACTION_ENTITY_ADD
          Action-code: entity added on the server, or just returned as an answer to Subscription.refreshEntity().
static int ACTION_ENTITY_DEL
          Action-code: entity logically removed on the server.
static int ACTION_ENTITY_KIL
          Action-code: entity physically removed on the server.
static int ACTION_ENTITY_RWT
          Action-code: entity rewritten on the server.
 
Fields inherited from interface Event
RESULT_GENERIC_ERROR, RESULT_OK
 
Method Summary
 int getAction()
          Returns the server action associated with the entity available on this event.
 Entity getEntity()
          Returns the entity available on this event.
 int getKeyID()
          Returns the index of the key on the basis of which the server has carried out getAction().
 TimeStamp getTimeStamp()
          Returns the timestamp associated with the entity available on this event.
 boolean isMasked()
          Returns the indication that some fields of getEntity() may be missings.
 
Methods inherited from interface SubscriptionEvent
getSubscription
 
Methods inherited from interface Event
getResult
 

Field Detail

ACTION_ENTITY_ADD

static final int ACTION_ENTITY_ADD
Action-code: entity added on the server, or just returned as an answer to Subscription.refreshEntity().

Historical data are always tagged as ACTION_ENTITY_ADD.

This value may be returned by getAction().

See Also:
Constant Field Values

ACTION_ENTITY_DEL

static final int ACTION_ENTITY_DEL
Action-code: entity logically removed on the server.

In this case the Entity returned by getEntity() is generally undefined on any fields apart from those associated with getKeyID().

Historical data are never tagged as ACTION_ENTITY_DEL.

This value may be returned by getAction().

See Also:
Constant Field Values

ACTION_ENTITY_RWT

static final int ACTION_ENTITY_RWT
Action-code: entity rewritten on the server.

Historical data are never tagged as ACTION_ENTITY_RWT.

This value may be returned by getAction().

See Also:
Constant Field Values

ACTION_ENTITY_KIL

static final int ACTION_ENTITY_KIL
Action-code: entity physically removed on the server.

Every time there is an ACTION_ENTITY_KIL the server EntityClass version changed. This new version is available in getTimeStamp().getDateTime() and it's different from both the initially subscribed EntityClass version and the initially required EntityClass version.

If getKeyID() > 0,
then


otherwise (getKeyID() <= 0)

Historical data are never tagged as ACTION_ENTITY_KIL.

This value may be returned by getAction().

See Also:
Constant Field Values
Method Detail

getAction

int getAction()
Returns the server action associated with the entity available on this event.

The possible returned values are described in the Field Summary section.

If this event is the server-answer to a Subscription.refreshEntity() the value ACTION_ENTITY_ADD is returned.

Returns:
the server action associated with the entity available on this event.

getTimeStamp

TimeStamp getTimeStamp()
Returns the timestamp associated with the entity available on this event.

Returns:
the timestamp associated with the entity available on this event.
null is never returned.

getEntity

Entity getEntity()
Returns the entity available on this event.

If getKeyID() <= 0
then


else

Returns:
the entity available on this event.
null is returned when getKeyID() <= 0.

getKeyID

int getKeyID()
Returns the index of the key on the basis of which the server has carried out getAction().

For ACTION_ENTITY_DEL and ACTION_ENTITY_KIL this value determines which field are available in getEntity().

Returns:
the index of the key on the basis of which the server has carried out getAction().
See Also:
getEntity()

isMasked

boolean isMasked()
Returns the indication that some fields of getEntity() may be missings.

For ACTION_ENTITY_ADD and ACTION_ENTITY_RWT this value determines which field are available in getEntity().

true is returned when this event refers a masked subscriptions and it is not an answer to a Subscription.refreshEntity().
In this case the Entity returned by getEntity() is generally undefined on any fields apart from those associated with the mask.

false is returned when this event refers a not masked subscriptions or it is an answer to a Subscription.refreshEntity().
In this case all fields of the Entity returned by getEntity() are meaningful.

Please note that the behaviour of this method does not depends on the values (SubscriptionParam.SUBSCRIBE_MASKED_FLOW_ALL and SubscriptionParam.SUBSCRIBE_MASKED_FLOW_LAST) given to SubscriptionParam.setFlow().

Returns:
the indication that some fields of getEntity() may be missings.
The return value is undefined for ACTION_ENTITY_DEL and ACTION_ENTITY_KIL.
See Also:
getEntity()


Submit a bug or feature to FT\API Programming Support<\font>