public interface SubscriptionParam
Subscription parameter container.
This container of subscription parameters is created by
Context.makeSubscriptionParam()
and it is used by
Context.makeSubscription()
.
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 |
---|
static final int SUBSCRIBE_FLOW_ALL
This value may be set with setFlow(int)
and retrieved by
getFlow()
.
static final int SUBSCRIBE_FLOW_LAST
This value may be set with setFlow(int)
and retrieved by
getFlow()
.
static final int SUBSCRIBE_MASKED_FLOW_ALL
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()
.
static final int SUBSCRIBE_MASKED_FLOW_LAST
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()
.
static final int QUERY_TYPE_ALL
This value may be set with setQueryType(int)
and retrieved by
getQueryType()
.
static final int QUERY_TYPE_SET
This value may be set with setQueryType(int)
and retrieved by
getQueryType()
.
static final int QUERY_TYPE_PAST
This value may be set with setQueryType(int)
and retrieved by
getQueryType()
.
static final int QUERY_TYPE_ON_TIME
This value may be set with setQueryType(int)
and retrieved by
getQueryType()
.
Method Detail |
---|
int getEntityClassID()
Subscription.start()
JFT.THIS
.isRegistered(getEntityClassID())
who sets this value
int getEntityClassVersion()
See Incremental Subscriptions to understand how to use this value.
Subscription.start()
getEntityClassTimeStamp()
== null ? value == 0 : value > 0
who sets this value
,
Incremental
SubscriptionsTimeStamp getEntityClassTimeStamp()
See Incremental Subscriptions to understand how to use this value.
Subscription.start()
null
getEntityClassTimeStamp() == null
? getEntityClassVersion()
== 0
: getEntityClassVersion()
> 0
who sets this value
,
Incremental
Subscriptionsint getQueryType()
The requested query selection criteria may be one of:
QUERY_TYPE_ALL
to request notifications for all entities:
QUERY_TYPE_SET
to request notifications for entities that
match a partial EntityKey: QUERY_TYPE_PAST
to request notifications for only past
entities values: QUERY_TYPE_ON_TIME
to request notifications for only
current entities values: See Partial Subscriptions to understand how to use this value with partial subscriptions.
Subscription.start()
QUERY_TYPE_ALL
getQueryType == QUERY_TYPE_ALL
|| getQueryType == QUERY_TYPE_SET
|| getQueryType == QUERY_TYPE_PAST
|| getQueryType == QUERY_TYPE_ON_TIME
who sets this value
,
Partial
SubscriptionsEntityKey getEntityKey()
See Partial Subscriptions to understand how to use this value.
Subscription.start()
null
getQueryType()
== QUERY_TYPE_SET
? (getEntityKey() != null &&
getEntityKey().getEntityClassID() == getEntityClassID()
)
: getEntityKey() == null
who sets this value
,
Partial
SubscriptionsFilter getFilter()
The filter is used to restrict (at the server level) the set of entities that will be notified.
Subscription.start()
null
getFilter() == null || getFilter().getStatus() == Filter.STATUS_CREATED
&& getQueryType()
!= QUERY_TYPE_SET
who sets this value
int getFlow()
The requested data transimission policy may be one of:
SUBSCRIBE_FLOW_LAST
or SUBSCRIBE_MASKED_FLOW_LAST
to request only the most recent snapshot of each entity sent by the
server,
SUBSCRIBE_FLOW_ALL
or SUBSCRIBE_MASKED_FLOW_ALL
to
request all variations sent by the server.
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.
Subscription.start()
SUBSCRIBE_FLOW_ALL
getFlow() == SUBSCRIBE_FLOW_ALL
|| getFlow() == SUBSCRIBE_FLOW_LAST
||
getFlow() == SUBSCRIBE_MASKED_FLOW_ALL
|| getFlow() == SUBSCRIBE_MASKED_FLOW_LAST
who sets this value
Mask getMask()
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.
Subscription.start()
null
getMask() == null || getMask().getEntityClassID() == getEntityClassID()
who sets this value
void setEntityClassID(int entityClassID) throws IllegalStateException
entityClassID
- the requested EntityClassID of the EntityClass for the new
Subscription.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their
meaning
void setEntityClassVersion(int entityClassVersion) throws IllegalStateException
entityClassVersion
- the requested EntityClassID of the EntityClass for the new
Subscription.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their
meaning
void setEntityClassTimeStamp(TimeStamp entityClassTimeStamp) throws IllegalStateException
entityClassTimeStamp
- the EntityClass TimeStamp of the last past notification
received by the client.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their
meaning
void setQueryType(int queryType) throws IllegalStateException
queryType
- the requested query selection criteria for the new
subscription.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning
void setEntityKey(EntityKey entityKey) throws IllegalStateException
entityKey
- the partial EntityKey for the new subscription.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning
void setFilter(Filter filter) throws IllegalStateException
filter
- the optional filter for the new subscription.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning
void setFlow(int subscribeFlow) throws IllegalStateException
subscribeFlow
- the requested data transimission policy for the new
subscription.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning
void setMask(Mask mask) throws IllegalStateException
mask
- the optional mask for the new subscription.
IllegalStateException
- if this container is already bound.default/current/acceptable values and their meaning