Diffusion .NET Client Library
6.1.5
|
An ITopicSelector is a value that identifies one or more topics. More...
Public Member Functions | |
bool | Selects (string topicPath) |
Evaluate this selector against a topic path. More... | |
Properties | |
TopicSelectorType | Type [get] |
Returns the type of selector. More... | |
string | Expression [get] |
The expression associated with this selector. More... | |
string | PathPrefix [get] |
Get the maximum topic path prefix from this selector pattern. More... | |
An ITopicSelector is a value that identifies one or more topics.
Depending on where it is used, a selector may be evaluated by either the server of the client library. For example, the server evaluates the selector used to subscribe to a topic. In contrast, the selector used to register a topic handler is evaluated by the client. Applications do not normally need to evaluate selectors, but may do so using Selects.
A client may receive a selector providing the context for certain operations. For example, to allow it to veto subscriptions. Limited ability to query the selector's Type, associated Expression, and ITopicPathSelector.Path is provided.
Selectors may be compared using the Equals operator. Selectors of different types are never equal.
Selectors may be created using ITopicSelectors.
bool PushTechnology.ClientInterface.Client.Topics.ITopicSelector.Selects | ( | string | topicPath | ) |
Evaluate this selector against a topic path.
topicPath |
|
get |
The expression associated with this selector.
|
get |
Get the maximum topic path prefix from this selector pattern.
Attempts to extract the largest possible topic path that this selector defines, from the beginning of the selector. If this selector is a TopicSelectorType.SPLIT_PATH_PATTERN or TopicSelectorType.FULL_PATH_PATTERN, this will return a topic path up until the point that a regular expression pattern is first encountered.
For TopicSelectorType.SELECTOR_SETs, this method will return the largest prefix that is common to all included selectors.
If no prefix can be extracted, this will return an empty string.
|
get |
Returns the type of selector.