Class SubscriptionFilter
java.lang.Object
com.iizix.server.push.engine.SubscriptionFilter
- All Implemented Interfaces:
ISubscriptionFilter
The subscription filter: the "group" a send targets, as a predicate over the store's dimensions plus a region selector.
Built with the fluent methods and then read through ISubscriptionFilter. User ids are the decimal form of UserInfoBase.id - push does not model identity and this is the only identity it names. The device dimension is not in the interface and is offered here for the client protocol's "this device" operations.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionapplications(String... ids) Adds application IDs to target.Adds devices to target.Gets the application ids this filter targets, empty for "any application".Gets the device UUIDs this filter targets, empty for any device.Gets the region selector — the subtrees this filter targets.Gets the topics this filter targets, empty for "any topic".Gets the user ids this filter targets, empty for "any user".regions(IRegionScope scope) Sets the region selector.Adds topics to target.toString()Gets a string representation.users(long... uids) Adds users to target.
Constructor Details
SubscriptionFilter
public SubscriptionFilter()Creates an empty filter that matches every subscription.
Method Details
applications
Adds application IDs to target.- Parameters:
ids- The application IDs.- Returns:
- This filter.
users
Adds users to target.- Parameters:
uids- The unique user IDs.- Returns:
- This filter.
topics
Adds topics to target.- Parameters:
names- The topics; the empty string is the application-level subscription.- Returns:
- This filter.
devices
Adds devices to target.- Parameters:
uuids- The device UUIDs.- Returns:
- This filter.
regions
Sets the region selector.- Parameters:
scope- The region selector, null for unrestricted.- Returns:
- This filter.
getApplicationIds
Description copied from interface:ISubscriptionFilterGets the application ids this filter targets, empty for "any application".- Specified by:
getApplicationIdsin interfaceISubscriptionFilter- Returns:
- An unmodifiable list of application ids; never
null.
getUserIds
Description copied from interface:ISubscriptionFilterGets the user ids this filter targets, empty for "any user".- Specified by:
getUserIdsin interfaceISubscriptionFilter- Returns:
- An unmodifiable list of user ids; never
null.
getTopics
Description copied from interface:ISubscriptionFilterGets the topics this filter targets, empty for "any topic".- Specified by:
getTopicsin interfaceISubscriptionFilter- Returns:
- An unmodifiable list of topics; never
null.
getDevices
getRegionSelector
Description copied from interface:ISubscriptionFilterGets the region selector — the subtrees this filter targets. An unrestricted scope targets every region (subject still to the operator's authorization). A subscription whose region falls outside this selector is reportedDeliveryOutcome.EXCLUDED_BY_REGION.- Specified by:
getRegionSelectorin interfaceISubscriptionFilter- Returns:
- The region selector; never
null.
toString