Interface ISubscriptionControl
This feature allows a ISession to subscribe or unsubscribe other sessions to topics, on a single server or across a cluster.
Inherited Members
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Topics
Assembly: Diffusion.Client.dll
Syntax
public interface ISubscriptionControl : IFeature
Remarks
Requests to subscribe sessions to topics can be submitted at any time even if the topics do not exist at the server. Topic selectors ITopicSelector are used on subscription to match against topics at the server. The session will become subscribed to any topics that exist at the server that match the selector (unless they are already subscribed, or the session has insufficient permission). The subscription request is also retained at the server so that if any newly-created topics match the selector, the session will then become subscribed to it (unless a subsequent unsubscription cancels it).
Specific sessions (anywhere in a cluster) may be subscribed/unsubscribed if the ISessionId is known.
Subscriptions may also be requested using 'session filters' (see ISession for a full description of session filters), where all sessions (anywhere in a cluster) that satisfy a particular filter expression will be subscribed/unsubscribed. The filter is only evaluated once against the current sessions that exist at the time - it is not retained and applied to any sessions that are created later. In order to be notified of new sessions as they are created ISessionPropertiesListener can be used and those sessions subscribed as required based upon their session properties.
Access control
To directly subscribe or unsubscribe other sessions to topics, a session must have MODIFY_SESSION permission, and SELECT_TOPIC permission for the topic selector used. The subscribed sessions will only be subscribed to matching topics for which they have READ_TOPIC permission.
To directly unsubscribe other sessions, a session must have MODIFY_SESSION permission.
Accessing the feature
This feature is obtained from an ISession as follows:
var subscriptionControl = session.SubscriptionControl;
Added in version 5.0.
Methods
GetTopicSelectionsAsync(ISessionId)
Returns a dictionary of the current topic selection state for a specified session, keyed on topic selection scope.
Declaration
Task<IDictionary<string, List<ITopicSelection>>> GetTopicSelectionsAsync(ISessionId sessionId)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | Identifies the session to return topic selections for. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.List<ITopicSelection>>> | The |
Remarks
Each scope will have an ordered list of selections and/or deselections.
The server conflates selections, so if there has been a selection that is later rendered redundant by a deselection it will not be present. A scope that has been used but fully deselected will therefore not be present in the dictionary and therefore no entry will have an empty list.
If the session has no current selections the dictionary will be empty.
If the task completes successfully, the Task
result will be a dictionary of an ordered List
of
ITopicSelections keyed on scope. If the default scope is in use the key will be
an empty string.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
NoSuchSessionException | There is no session with the given |
SessionSecurityException | The calling session does not have VIEW_SESSION permission. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
GetTopicSelectionsAsync(ISessionId, CancellationToken)
Returns a dictionary of the current topic selection state for a specified session, keyed on topic selection scope.
Declaration
Task<IDictionary<string, List<ITopicSelection>>> GetTopicSelectionsAsync(ISessionId sessionId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | Identifies the session to return topic selections for. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.List<ITopicSelection>>> | The |
Remarks
Each scope will have an ordered list of selections and/or deselections.
The server conflates selections, so if there has been a selection that is later rendered redundant by a deselection it will not be present. A scope that has been used but fully deselected will therefore not be present in the dictionary and therefore no entry will have an empty list.
If the session has no current selections the dictionary will be empty.
If the task completes successfully, the Task
result will be a dictionary of an ordered List
of
ITopicSelections keyed on scope. If the default scope is in use the key will be
an empty string.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
NoSuchSessionException | There is no session with the given |
SessionSecurityException | The calling session does not have VIEW_SESSION permission. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeAsync(ISessionId, ITopicSelector)
Subscribe another session to topics.
Declaration
Task<object> SubscribeAsync(ISessionId sessionId, ITopicSelector topics)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to subscribe. |
ITopicSelector | topics | The topics to subscribe to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
This is equivalent to calling SubscribeAsync(ISessionId, ITopicSelector, String) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeAsync(ISessionId, ITopicSelector, String)
Subscribe another session to topics.
Declaration
Task<object> SubscribeAsync(ISessionId sessionId, ITopicSelector topics, string scope)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to subscribe. |
ITopicSelector | topics | The topics to subscribe to. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
New subscriptions will be established for existing topics that match the provided topic selector and for which the subscribed session has READ_TOPIC permission. The topic selector will be added to the topic selections of the subscribed session, and re-evaluated when new topics are added or the session's security roles change.
A session that does not have SELECT_TOPIC permission for a topic cannot subscribe directly, but can be subscribed indirectly using this method.
If the subscription was accepted, the task will complete successfully,
and the Task
result will be null
.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeAsync(ISessionId, ITopicSelector, String, CancellationToken)
Subscribe another session to topics.
Declaration
Task<object> SubscribeAsync(ISessionId sessionId, ITopicSelector topics, string scope, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to subscribe. |
ITopicSelector | topics | The topics to subscribe to. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
New subscriptions will be established for existing topics that match the provided topic selector and for which the subscribed session has READ_TOPIC permission. The topic selector will be added to the topic selections of the subscribed session, and re-evaluated when new topics are added or the session's security roles change.
A session that does not have SELECT_TOPIC permission for a topic cannot subscribe directly, but can be subscribed indirectly using this method.
If the subscription was accepted, the task will complete successfully,
and the Task
result will be null
.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeAsync(ISessionId, ITopicSelector, CancellationToken)
Subscribe another session to topics.
Declaration
Task<object> SubscribeAsync(ISessionId sessionId, ITopicSelector topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to subscribe. |
ITopicSelector | topics | The topics to subscribe to. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
This is equivalent to calling SubscribeAsync(ISessionId, ITopicSelector, String, CancellationToken) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeAsync(ISessionId, String)
Subscribe another session to topics.
Declaration
Task<object> SubscribeAsync(ISessionId sessionId, string topics)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to subscribe. |
System.String | topics | The topics to subscribe to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
This is equivalent to calling SubscribeAsync(ISessionId, String, String) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.6.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeAsync(ISessionId, String, String)
Subscribe another session to topics.
Declaration
Task<object> SubscribeAsync(ISessionId sessionId, string topics, string scope)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to subscribe. |
System.String | topics | The topics to subscribe to. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
New subscriptions will be established for existing topics that match the provided topic selector and for which the subscribed session has READ_TOPIC permission. The topic selector will be added to the topic selections of the subscribed session, and re-evaluated when new topics are added or the session's security roles change.
A session that does not have SELECT_TOPIC permission for a topic cannot subscribe directly, but can be subscribed indirectly using this method.
If the subscription was accepted, the task will complete successfully,
and the Task
result will be null
.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeAsync(ISessionId, String, String, CancellationToken)
Subscribe another session to topics.
Declaration
Task<object> SubscribeAsync(ISessionId sessionId, string topics, string scope, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to subscribe. |
System.String | topics | The topics to subscribe to. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
New subscriptions will be established for existing topics that match the provided topic selector and for which the subscribed session has READ_TOPIC permission. The topic selector will be added to the topic selections of the subscribed session, and re-evaluated when new topics are added or the session's security roles change.
A session that does not have SELECT_TOPIC permission for a topic cannot subscribe directly, but can be subscribed indirectly using this method.
If the subscription was accepted, the task will complete successfully,
and the Task
result will be null
.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeAsync(ISessionId, String, CancellationToken)
Subscribe another session to topics.
Declaration
Task<object> SubscribeAsync(ISessionId sessionId, string topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to subscribe. |
System.String | topics | The topics to subscribe to. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
This is equivalent to calling SubscribeAsync(ISessionId, String, String, CancellationToken) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.6.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeByFilterAsync(String, ITopicSelector)
Subscribe sessions that satisfy a given session filter to topics.
Declaration
Task<ISubscriptionByFilterResult> SubscribeByFilterAsync(string filter, ITopicSelector topics)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to subscribe to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
This is equivalent to calling SubscribeByFilterAsync(String, ITopicSelector, String) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeByFilterAsync(String, ITopicSelector, String)
Subscribe sessions that satisfy a given session filter to topics. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> SubscribeByFilterAsync(string filter, ITopicSelector topics, string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to subscribe to. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the subscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
This provides the number of sessions that satisfied the filter and qualified
for subscription by calling NumberSelected.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeByFilterAsync(String, ITopicSelector, String, CancellationToken)
Subscribe sessions that satisfy a given session filter to topics. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> SubscribeByFilterAsync(string filter, ITopicSelector topics, string scope, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to subscribe to. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the subscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
This provides the number of sessions that satisfied the filter and qualified
for subscription by calling NumberSelected.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeByFilterAsync(String, ITopicSelector, CancellationToken)
Subscribe sessions that satisfy a given session filter to topics.
Declaration
Task<ISubscriptionByFilterResult> SubscribeByFilterAsync(string filter, ITopicSelector topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to subscribe to. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
This is equivalent to calling SubscribeByFilterAsync(String, ITopicSelector, String, CancellationToken) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeByFilterAsync(String, String)
Subscribe sessions that satisfy a given session filter to topics.
Declaration
Task<ISubscriptionByFilterResult> SubscribeByFilterAsync(string filter, string topics)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to subscribe to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
This is equivalent to calling SubscribeByFilterAsync(String, String, String) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.6.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeByFilterAsync(String, String, String)
Subscribe sessions that satisfy a given session filter to topics. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> SubscribeByFilterAsync(string filter, string topics, string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to subscribe to. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the subscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
This provides the number of sessions that satisfied the filter and qualified
for subscription by calling NumberSelected.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeByFilterAsync(String, String, String, CancellationToken)
Subscribe sessions that satisfy a given session filter to topics. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> SubscribeByFilterAsync(string filter, string topics, string scope, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to subscribe to. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the subscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
This provides the number of sessions that satisfied the filter and qualified
for subscription by calling NumberSelected.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
SubscribeByFilterAsync(String, String, CancellationToken)
Subscribe sessions that satisfy a given session filter to topics.
Declaration
Task<ISubscriptionByFilterResult> SubscribeByFilterAsync(string filter, string topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to subscribe to. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
This is equivalent to calling SubscribeByFilterAsync(String, String, String, CancellationToken) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.6.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAllScopesAsync(ISessionId, ITopicSelector)
Unsubscribe another session from topics for all topic selection scopes.
Declaration
Task<object> UnsubscribeAllScopesAsync(ISessionId sessionId, ITopicSelector topics)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | Identifies the session to unsubscribe. |
ITopicSelector | topics | The topics to unsubscribe from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | There is no session with the given |
SessionSecurityException | The calling session does not have MODIFY_SESSION and SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAllScopesAsync(ISessionId, ITopicSelector, CancellationToken)
Unsubscribe another session from topics for all topic selection scopes.
Declaration
Task<object> UnsubscribeAllScopesAsync(ISessionId sessionId, ITopicSelector topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | Identifies the session to unsubscribe. |
ITopicSelector | topics | The topics to unsubscribe from. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | There is no session with the given |
SessionSecurityException | The calling session does not have MODIFY_SESSION and SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAllScopesAsync(ISessionId, String)
Unsubscribe another session from topics for all topic selection scopes.
Declaration
Task<object> UnsubscribeAllScopesAsync(ISessionId sessionId, string topics)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | Identifies the session to unsubscribe. |
System.String | topics | The topics to unsubscribe from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | There is no session with the given |
SessionSecurityException | The calling session does not have MODIFY_SESSION and SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAllScopesAsync(ISessionId, String, CancellationToken)
Unsubscribe another session from topics for all topic selection scopes.
Declaration
Task<object> UnsubscribeAllScopesAsync(ISessionId sessionId, string topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | Identifies the session to unsubscribe. |
System.String | topics | The topics to unsubscribe from. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | There is no session with the given |
SessionSecurityException | The calling session does not have MODIFY_SESSION and SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAllScopesByFilterAsync(String, ITopicSelector)
Unsubscribe sessions that satisfy a given session filter from topics for all scopes. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeAllScopesByFilterAsync(string filter, ITopicSelector topics)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to unsubscribe from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the unsubscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAllScopesByFilterAsync(String, ITopicSelector, CancellationToken)
Unsubscribe sessions that satisfy a given session filter from topics for all scopes. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeAllScopesByFilterAsync(string filter, ITopicSelector topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to unsubscribe from. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the unsubscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAllScopesByFilterAsync(String, String)
Unsubscribe sessions that satisfy a given session filter from topics for all scopes. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeAllScopesByFilterAsync(string filter, string topics)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to unsubscribe from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the unsubscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAllScopesByFilterAsync(String, String, CancellationToken)
Unsubscribe sessions that satisfy a given session filter from topics for all scopes. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeAllScopesByFilterAsync(string filter, string topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to unsubscribe from. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the unsubscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAsync(ISessionId, ITopicSelector)
Unsubscribe another session from topics.
Declaration
Task<object> UnsubscribeAsync(ISessionId sessionId, ITopicSelector topics)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to unsubscribe. |
ITopicSelector | topics | The topics to unsubscribe from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
This is equivalent to calling UnsubscribeAsync(ISessionId, ITopicSelector, String) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAsync(ISessionId, ITopicSelector, String)
Unsubscribe another session from topics.
Declaration
Task<object> UnsubscribeAsync(ISessionId sessionId, ITopicSelector topics, string scope)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to unsubscribe. |
ITopicSelector | topics | The topics to unsubscribe from. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAsync(ISessionId, ITopicSelector, String, CancellationToken)
Unsubscribe another session from topics.
Declaration
Task<object> UnsubscribeAsync(ISessionId sessionId, ITopicSelector topics, string scope, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to unsubscribe. |
ITopicSelector | topics | The topics to unsubscribe from. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAsync(ISessionId, ITopicSelector, CancellationToken)
Unsubscribe another session from topics.
Declaration
Task<object> UnsubscribeAsync(ISessionId sessionId, ITopicSelector topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to unsubscribe. |
ITopicSelector | topics | The topics to unsubscribe from. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
This is equivalent to calling UnsubscribeAsync(ISessionId, ITopicSelector, String, CancellationToken) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAsync(ISessionId, String)
Unsubscribe another session from topics.
Declaration
Task<object> UnsubscribeAsync(ISessionId sessionId, string topics)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to unsubscribe. |
System.String | topics | The topics to unsubscribe from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
This is equivalent to calling UnsubscribeAsync(ISessionId, String, String) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.6.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAsync(ISessionId, String, String)
Unsubscribe another session from topics.
Declaration
Task<object> UnsubscribeAsync(ISessionId sessionId, string topics, string scope)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to unsubscribe. |
System.String | topics | The topics to unsubscribe from. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAsync(ISessionId, String, String, CancellationToken)
Unsubscribe another session from topics.
Declaration
Task<object> UnsubscribeAsync(ISessionId sessionId, string topics, string scope, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to unsubscribe. |
System.String | topics | The topics to unsubscribe from. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeAsync(ISessionId, String, CancellationToken)
Unsubscribe another session from topics.
Declaration
Task<object> UnsubscribeAsync(ISessionId sessionId, string topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | The session to unsubscribe. |
System.String | topics | The topics to unsubscribe from. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | The |
Remarks
This is equivalent to calling UnsubscribeAsync(ISessionId, String, String, CancellationToken) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.6.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
NoSuchSessionException | The identified session was closed before the response was delivered. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION permission. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeByFilterAsync(String, ITopicSelector)
Unsubscribe sessions that satisfy a given session filter from topics.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeByFilterAsync(string filter, ITopicSelector topics)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to unsubscribe from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
This is equivalent to calling UnsubscribeByFilterAsync(String, ITopicSelector, String) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeByFilterAsync(String, ITopicSelector, String)
Unsubscribe sessions that satisfy a given session filter from topics. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeByFilterAsync(string filter, ITopicSelector topics, string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to unsubscribe from. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the unsubscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
This provides the number of sessions that satisfied the filter and qualified
for unsubscription by calling NumberSelected.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeByFilterAsync(String, ITopicSelector, String, CancellationToken)
Unsubscribe sessions that satisfy a given session filter from topics. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeByFilterAsync(string filter, ITopicSelector topics, string scope, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to unsubscribe from. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the unsubscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
This provides the number of sessions that satisfied the filter and qualified
for unsubscription by calling NumberSelected.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeByFilterAsync(String, ITopicSelector, CancellationToken)
Unsubscribe sessions that satisfy a given session filter from topics.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeByFilterAsync(string filter, ITopicSelector topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
ITopicSelector | topics | The topics to unsubscribe from. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
This is equivalent to calling UnsubscribeByFilterAsync(String, ITopicSelector, String, CancellationToken) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeByFilterAsync(String, String)
Unsubscribe sessions that satisfy a given session filter from topics.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeByFilterAsync(string filter, string topics)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to unsubscribe from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
This is equivalent to calling UnsubscribeByFilterAsync(String, String, String) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.6.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeByFilterAsync(String, String, String)
Unsubscribe sessions that satisfy a given session filter from topics. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeByFilterAsync(string filter, string topics, string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to unsubscribe from. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the unsubscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
This provides the number of sessions that satisfied the filter and qualified
for unsubscription by calling NumberSelected.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeByFilterAsync(String, String, String, CancellationToken)
Unsubscribe sessions that satisfy a given session filter from topics. In a clustered environment the filter will be applied to all servers in the cluster.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeByFilterAsync(string filter, string topics, string scope, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to unsubscribe from. |
System.String | scope | Specifies the scope of the selection. See Topic Selection Scopes in ITopics. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
If the unsubscription was accepted, the task will complete successfully,
and the Task
result will bear a ISubscriptionByFilterResult.
This provides the number of sessions that satisfied the filter and qualified
for unsubscription by calling NumberSelected.
Added in version 6.12.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |
UnsubscribeByFilterAsync(String, String, CancellationToken)
Unsubscribe sessions that satisfy a given session filter from topics.
Declaration
Task<ISubscriptionByFilterResult> UnsubscribeByFilterAsync(string filter, string topics, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | filter | The session filter expression. |
System.String | topics | The topics to unsubscribe from. |
System.Threading.CancellationToken | cancellationToken | The cancellation token used to cancel the current operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ISubscriptionByFilterResult> | The |
Remarks
This is equivalent to calling UnsubscribeByFilterAsync(String, String, String, CancellationToken) using the default selection scope. See Topic Selection Scopes in ITopics.
Added in version 6.6.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TopicSelectorFormatException | The |
InvalidFilterException | The filter was invalid. Thrown by the returned task. |
SessionSecurityException | The calling session does not have MODIFY_SESSION and VIEW_SESSION global permissions. Thrown by the returned task. |
SessionSecurityException | The calling session does not have SELECT_TOPIC permission for the selector expression. Thrown by the returned task. |
SessionClosedException | The calling session is closed. Thrown by the returned task. |
ClusterRoutingException | The operation failed due to a transient cluster error. Thrown by the returned task. |