it.list.jft
Interface SubscriptionParam

All Superinterfaces:
Param

public interface SubscriptionParam
extends Param

Subscription parameter container.

This container of subscription parameters is created by Context.makeSubscriptionParam() and it is used by Context.makeSubscription().

See Also:
Subscription Usage, Incremental Subscriptions, Partial Subscriptions, Acceptable Values

Field Summary
static int QUERY_TYPE_ALL
          Query selection code: all entities.
static int QUERY_TYPE_ON_TIME
          Query selection code: only current entities values.
static int QUERY_TYPE_PAST
          Query selection code: only past entities values and then idle event.
static int QUERY_TYPE_SET
          Query selection code: all entities that match a partial EntityKey.
static int SUBSCRIBE_FLOW_ALL
          Data transmission policy code: all variations sent by the server.
static int SUBSCRIBE_FLOW_LAST
          Data transmission policy code: only the most recent snapshot of each entity sent by the server.
static int SUBSCRIBE_MASKED_FLOW_ALL
          Data transmission policy code: all variations sent by the server.
static int SUBSCRIBE_MASKED_FLOW_LAST
          Data transmission policy code: only the most recent snapshot of each entity sent by the server.
 
Method Summary
 int getEntityClassID()
          Returns the requested EntityClassID of the EntityClass for the new Subscription.
 TimeStamp getEntityClassTimeStamp()
          Returns the EntityClass TimeStamp of the last past notification received by the client.
 int getEntityClassVersion()
          Returns the EntityClass version of the last past notification received by the client.
 EntityKey getEntityKey()
          Returns the partial EntityKey for the new subscription.
 Filter getFilter()
          Returns the optional filter for the new subscription.
 int getFlow()
          Returns the requested data transimission policy for the new subscription.
 Mask getMask()
          Returns the optional mask for the new subscription.
 int getQueryType()
          Returns the requested query selection criteria for the new subscription.
 void setEntityClassID(int entityClassID)
          Set/replace the requested EntityClassID of the EntityClass for the new Subscription.
 void setEntityClassTimeStamp(TimeStamp entityClassTimeStamp)
          Set/replace the EntityClass TimeStamp of the last past notification received by the client.
 void setEntityClassVersion(int entityClassVersion)
          Set/replace the EntityClass version of the last past notification received by the client.
 void setEntityKey(EntityKey entityKey)
          Set/replace the partial EntityKey for the new subscription.
 void setFilter(Filter filter)
          Set/replace the optional filter for the new subscription.
 void setFlow(int subscribeFlow)
          Set/replace the requested data transimission policy for the new subscription.
 void setMask(Mask mask)
          Set/replace the optional mask for the new subscription.
 void setQueryType(int queryType)
          Set/replace the requested query selection criteria for the new subscription.
 
Methods inherited from interface Param
isBound
 

Field Detail

SUBSCRIBE_FLOW_ALL

static final int SUBSCRIBE_FLOW_ALL
Data transmission policy code: all variations sent by the server.

This value may be set with setFlow(int) and retrieved by getFlow().

See Also:
Constant Field Values

SUBSCRIBE_FLOW_LAST

static final int SUBSCRIBE_FLOW_LAST
Data transmission policy code: only the most recent snapshot of each entity sent by the server.

This value may be set with setFlow(int) and retrieved by getFlow().

See Also:
Constant Field Values

SUBSCRIBE_MASKED_FLOW_ALL

static final int SUBSCRIBE_MASKED_FLOW_ALL
Data transmission policy code: all variations sent by the server.

The transmission is optimized in a transparent way in a manner that only non-zero values are sent. Please note that this is only an optimization hint and so it does not change the behaviour of SubscriptionNotifyEvent.isMasked().

This value may be set with setFlow(int) and retrieved by getFlow().

See Also:
Constant Field Values

SUBSCRIBE_MASKED_FLOW_LAST

static final int SUBSCRIBE_MASKED_FLOW_LAST
Data transmission policy code: only the most recent snapshot of each entity sent by the server.

The transmission is optimized in a transparent way in a manner that only non-zero values are sent. Please note that this is only an optimization hint and so it does not change the behaviour of SubscriptionNotifyEvent.isMasked().

This value may be set with setFlow(int) and retrieved by getFlow().

See Also:
Constant Field Values

QUERY_TYPE_ALL

static final int QUERY_TYPE_ALL
Query selection code: all entities.

This value may be set with setQueryType(int) and retrieved by getQueryType().

See Also:
Constant Field Values

QUERY_TYPE_SET

static final int QUERY_TYPE_SET
Query selection code: all entities that match a partial EntityKey.

This value may be set with setQueryType(int) and retrieved by getQueryType().

See Also:
Constant Field Values

QUERY_TYPE_PAST

static final int QUERY_TYPE_PAST
Query selection code: only past entities values and then idle event.

This value may be set with setQueryType(int) and retrieved by getQueryType().

See Also:
Constant Field Values

QUERY_TYPE_ON_TIME

static final int QUERY_TYPE_ON_TIME
Query selection code: only current entities values.

This value may be set with setQueryType(int) and retrieved by getQueryType().

See Also:
Constant Field Values
Method Detail

getEntityClassID

int getEntityClassID()
Returns the requested EntityClassID of the EntityClass for the new Subscription.

Used by:
Subscription.start()
Default value:
0
Acceptable values:
JFT.THIS.isRegistered(getEntityClassID())

Returns:
the requested EntityClassID of the EntityClass for the new Subscription.
See Also:
who sets this value

getEntityClassVersion

int getEntityClassVersion()
Returns the EntityClass version of the last past notification received by the client.

See Incremental Subscriptions to understand how to use this value.

Used by:
Subscription.start()
Default value:
0
Acceptable values:
getEntityClassTimeStamp() == null ? value == 0 : value > 0

Returns:
the EntityClassID of the EntityClass on which the new Subscription is made.
See Also:
who sets this value, Incremental Subscriptions

getEntityClassTimeStamp

TimeStamp getEntityClassTimeStamp()
Returns the EntityClass TimeStamp of the last past notification received by the client.

See Incremental Subscriptions to understand how to use this value.

Used by:
Subscription.start()
Default value:
null
Acceptable values:
getEntityClassTimeStamp() == null
? getEntityClassVersion() == 0
: getEntityClassVersion() > 0

Returns:
the EntityClass TimeStamp of the last past notification received by the client.
See Also:
who sets this value, Incremental Subscriptions

getQueryType

int getQueryType()
Returns the requested query selection criteria for the new subscription.

The requested query selection criteria may be one of:

See Partial Subscriptions to understand how to use this value with partial subscriptions.

Used by:
Subscription.start()
Default value:
QUERY_TYPE_ALL
Acceptable values:
   getQueryType == QUERY_TYPE_ALL
|| getQueryType == QUERY_TYPE_SET
|| getQueryType == QUERY_TYPE_PAST
|| getQueryType == QUERY_TYPE_ON_TIME

Returns:
the requested query selection criteria for the new subscription.
See Also:
who sets this value, Partial Subscriptions

getEntityKey

EntityKey getEntityKey()
Returns the partial EntityKey for the new subscription.

See Partial Subscriptions to understand how to use this value.

Used by:
Subscription.start()
Default value:
null
Acceptable values:
getQueryType() == QUERY_TYPE_SET
? (getEntityKey() != null && getEntityKey().getEntityClassID() == getEntityClassID())
: getEntityKey() == null

Returns:
the partial EntityKey for the new subscription.
See Also:
who sets this value, Partial Subscriptions

getFilter

Filter getFilter()
Returns the optional filter for the new subscription.

The filter is used to restrict (at the server level) the set of entities that will be notified.

Used by:
Subscription.start()
Default value:
null
Acceptable values:
getFilter() == null || getFilter().getStatus() == Filter.STATUS_CREATED && getQueryType() != QUERY_TYPE_SET

Returns:
the optional filter for the new subscription.
See Also:
who sets this value

getFlow

int getFlow()
Returns the requested data transimission policy for the new subscription.

The requested data transimission policy may be one of:

With the first two values the quantity of the data sent by the server is adapted to the reception speed of the client. In practice, to each send operation, the server only sends the most recent image of the entity, respect the previous send.

The latter two values require the server to send all the variations of the entities of the subscribed class.

Basically SUBSCRIBE_*FLOW_LAST adapts the transmission resolution of the Server to the reception band of the Client. SUBSCRIBE_*FLOW_ALL, on the other hand, requires each intermediate variation of the Server DataBase to be submitted. Thus delays in the acquisition by the Client may occur due to the increase in load of the buffer nside the communication channel.

The SUBSCRIBE_MASKED_FLOW_LAST and SUBSCRIBE_MASKED_FLOW_ALL are equivalent to the non-MASKED version, apart the fact the transmission is optimized in a manner that only all non-zero values are sent from server to client. This optimization is transparent to the client application, e.g. the behavior of SubscriptionNotifyEvent.isMasked() does not change for MASKED or non-MASKED flow values.

Used by:
Subscription.start()
Default value:
SUBSCRIBE_FLOW_ALL
Acceptable values:
getFlow() == SUBSCRIBE_FLOW_ALL || getFlow() == SUBSCRIBE_FLOW_LAST ||
getFlow() == SUBSCRIBE_MASKED_FLOW_ALL || getFlow() == SUBSCRIBE_MASKED_FLOW_LAST

Returns:
the requested data transimission policy for the new subscription.
See Also:
who sets this value

getMask

Mask getMask()
Returns the optional mask for the new subscription.

The mask is used to restrict (at the server level) the set of fields of entities that will be notified.

If this value is not-null then the Entitity returned by SubscriptionNotifyEvent.getEntity() will contain only the fields specified by this mask.

Used by:
Subscription.start()
Default value:
null
Acceptable values:
getMask() == null || getMask().getEntityClassID() == getEntityClassID()

Returns:
the optional mask for the new subscription.
See Also:
who sets this value

setEntityClassID

void setEntityClassID(int entityClassID)
                      throws IllegalStateException
Set/replace the requested EntityClassID of the EntityClass for the new Subscription.

Parameters:
entityClassID - the requested EntityClassID of the EntityClass for the new Subscription.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setEntityClassVersion

void setEntityClassVersion(int entityClassVersion)
                           throws IllegalStateException
Set/replace the EntityClass version of the last past notification received by the client.

Parameters:
entityClassVersion - the requested EntityClassID of the EntityClass for the new Subscription.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setEntityClassTimeStamp

void setEntityClassTimeStamp(TimeStamp entityClassTimeStamp)
                             throws IllegalStateException
Set/replace the EntityClass TimeStamp of the last past notification received by the client.

Parameters:
entityClassTimeStamp - the EntityClass TimeStamp of the last past notification received by the client.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setQueryType

void setQueryType(int queryType)
                  throws IllegalStateException
Set/replace the requested query selection criteria for the new subscription.

Parameters:
queryType - the requested query selection criteria for the new subscription.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setEntityKey

void setEntityKey(EntityKey entityKey)
                  throws IllegalStateException
Set/replace the partial EntityKey for the new subscription.

Parameters:
entityKey - the partial EntityKey for the new subscription.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setFilter

void setFilter(Filter filter)
               throws IllegalStateException
Set/replace the optional filter for the new subscription.

Parameters:
filter - the optional filter for the new subscription.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setFlow

void setFlow(int subscribeFlow)
             throws IllegalStateException
Set/replace the requested data transimission policy for the new subscription.

Parameters:
subscribeFlow - the requested data transimission policy for the new subscription.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setMask

void setMask(Mask mask)
             throws IllegalStateException
Set/replace the optional mask for the new subscription.

Parameters:
mask - the optional mask for the new subscription.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning


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