Diffusion .NET Client Library
6.1.5
|
This feature allows a client session to subscribe or unsubscribe other clients to topics. It also provides a mechanism for handling requests to subscribe to routing topics. More...
Public Member Functions | |
void | AddRoutingSubscriptionHandler (string topicPath, IRoutingSubscriptionRequestHandler handler) |
Adds a handler to associate with a particular node in the topic tree that will be called upon requests to subscribe to routing topics where there is no routing subscription handler declared at the server. More... | |
void | Subscribe (ISessionId client, string topics, ISubscriptionCallback callback) |
Send a request to subscribe a client to a topic or a selection of topics. More... | |
void | Subscribe (ISessionId client, ITopicSelector topics, ISubscriptionCallback callback) |
Send a request to subscribe a client to a topic or a selection of topics. More... | |
void | Subscribe< TC > (ISessionId client, string topics, TC context, ISubscriptionContextCallback< TC > callback) |
Subscribe a client to topics. More... | |
void | Subscribe< TC > (ISessionId client, ITopicSelector topics, TC context, ISubscriptionContextCallback< TC > callback) |
Send a request to subscribe a client to a single topic providing the snapshot data to be provided to the client. More... | |
void | Unsubscribe (ISessionId client, string topics, ISubscriptionCallback callback) |
Send a request to unsubscribe a client from a topic or topics. More... | |
void | Unsubscribe (ISessionId client, ITopicSelector topics, ISubscriptionCallback callback) |
Send a request to unsubscribe a client from a topic or topics. More... | |
void | Unsubscribe< TC > (ISessionId client, string topics, TC context, ISubscriptionContextCallback< TC > callback) |
Send a request to unsubscribe a client from a topic or topics. More... | |
void | Unsubscribe< TC > (ISessionId client, ITopicSelector topics, TC context, ISubscriptionContextCallback< TC > callback) |
Send a request to unsubscribe a client from a topic or topics. More... | |
void | SubscribeByFilter (string filter, string topics, ISubscriptionByFilterCallback callback) |
Subscribe to all sessions that satisfy a given session filter to topics. More... | |
void | SubscribeByFilter (string filter, ITopicSelector topics, ISubscriptionByFilterCallback callback) |
Subscribe to all sessions that satisfy a given session filter to topics. More... | |
void | SubscribeByFilter< TC > (string filter, string topics, TC context, ISubscriptionByFilterContextCallback< TC > callback) |
Subscribe to all sessions that satisfy a given session filter to topics. More... | |
void | SubscribeByFilter< TC > (string filter, ITopicSelector topics, TC context, ISubscriptionByFilterContextCallback< TC > callback) |
Subscribe to all sessions that satisfy a given session filter to topics. More... | |
void | UnsubscribeByFilter (string filter, string topics, ISubscriptionByFilterCallback callback) |
Unsubscribe all sessions that satisfy a given session filter from topics. More... | |
void | UnsubscribeByFilter (string filter, ITopicSelector topics, ISubscriptionByFilterCallback callback) |
Unsubscribe all sessions that satisfy a given session filter from topics. More... | |
void | UnsubscribeByFilter< TC > (string filter, string topics, TC context, ISubscriptionByFilterContextCallback< TC > callback) |
Unsubscribe all sessions that satisfy a given session filter from topics. More... | |
void | UnsubscribeByFilter< TC > (string filter, ITopicSelector topics, TC context, ISubscriptionByFilterContextCallback< TC > callback) |
Unsubscribe all sessions that satisfy a given session filter from topics. More... | |
Additional Inherited Members | |
Properties inherited from PushTechnology.ClientInterface.Client.Features.IFeature | |
ISession | Session [get] |
Returns the session that the feature is associated with. More... | |
This feature allows a client session to subscribe or unsubscribe other clients to topics. It also provides a mechanism for handling requests to subscribe to routing topics.
Requests to subscribe clients to topics can be submitted at any time even if the the topics do not exist at the server. TopicSelector Topic selectors are used on subscription to match against topics at the server. The client will become subscribed to any topics that exist at the server that match the selector (unless they are already subscribed, or the client has insufficient permission). The subscription request is also retained at the server so that if any newly-created topics match the selector then the client will then become subscribed to it (unless a subsequent unsubscription cancels it).
Specific client sessions may be subscribed/unsubscribed if the SessionId is known.
Subscriptions may also be requested using 'filters' (see ISession for a full description of session filters), where all sessions 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 subscribe other sessions to topics, a session must have GlobalPermission.MODIFY_SESSION permission, and TopicPermission.SELECT_TOPIC permission for the path prefix of the topic selector used for subscription. The subscribed sessions will only be subscribed to matching topics for which they have TopicPermission.READ_TOPIC permission.
To unsubscribe other sessions, a session must have GlobalPermission.MODIFY_SESSION permission.
To register a AddRoutingSubscriptionHandler the session needs GlobalPermission.VIEW_SESSION, GlobalPermission.MODIFY_SESSION and GlobalPermission.REGISTER_HANDLER permissions.
When handling a subscription request to a routing topic via a routing handler the target client needs to have TopicPermission.READ_TOPIC permission to both the routing topic being subscribed to and the target topic that is assigned.
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.AddRoutingSubscriptionHandler | ( | string | topicPath, |
IRoutingSubscriptionRequestHandler | handler | ||
) |
Adds a handler to associate with a particular node in the topic tree that will be called upon requests to subscribe to routing topics where there is no routing subscription handler declared at the server.
topicPath | Identifies a topic node to associate the handler with. |
handler | Specifies the handler for the specified node and all subordinate nodes (unless overridden by another handler). |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.Subscribe | ( | ISessionId | client, |
string | topics, | ||
ISubscriptionCallback | callback | ||
) |
Send a request to subscribe a client to a topic or a selection of topics.
client | Identifies the client to subscribe. |
topics | The topics to subscribe to. |
callback | Provides callback methods to indicate success or failure. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.Subscribe | ( | ISessionId | client, |
ITopicSelector | topics, | ||
ISubscriptionCallback | callback | ||
) |
Send a request to subscribe a client to a topic or a selection of topics.
client | Identifies the client to subscribe. |
topics | the topics to subscribe to, specified as a topic selector expression. |
callback | Provides callback methods to indicate success or failure. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.Subscribe< TC > | ( | ISessionId | client, |
string | topics, | ||
TC | context, | ||
ISubscriptionContextCallback< TC > | callback | ||
) |
Subscribe a client to topics.
client | Identifies the client to subscribe. |
topics | The topics to subscribe to. |
context | Passed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null. |
callback | Provides callback methods to indicate success or failure. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.Subscribe< TC > | ( | ISessionId | client, |
ITopicSelector | topics, | ||
TC | context, | ||
ISubscriptionContextCallback< TC > | callback | ||
) |
Send a request to subscribe a client to a single topic providing the snapshot data to be provided to the client.
This may only be used for topics of type 'stateless'.
client | Identifies the client to subscribe. |
topics | The topics to subscribe to. |
context | Passed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null. |
callback | Provides callback methods to indicate success or failure. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.SubscribeByFilter | ( | string | filter, |
string | topics, | ||
ISubscriptionByFilterCallback | callback | ||
) |
Subscribe to all sessions that satisfy a given session filter to topics.
filter | The session filter expression. |
topics | The topics to subscribe to specified as a TopicSelector |
expression.
callback | Provides callback methods to indicate success or failure. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.SubscribeByFilter | ( | string | filter, |
ITopicSelector | topics, | ||
ISubscriptionByFilterCallback | callback | ||
) |
Subscribe to all sessions that satisfy a given session filter to topics.
filter | The session filter expression. |
topics | Identifies the topics to subscribe to. |
callback | Provides callback methods to indicate success or failure. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.SubscribeByFilter< TC > | ( | string | filter, |
string | topics, | ||
TC | context, | ||
ISubscriptionByFilterContextCallback< TC > | callback | ||
) |
Subscribe to all sessions that satisfy a given session filter to topics.
TC | The context object type. |
filter | The session filter expression. |
topics | The topics to subscribe to specified as a TopicSelector |
expression.
context | Passed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null. |
callback | Provides callback methods to indicate success or failure. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.SubscribeByFilter< TC > | ( | string | filter, |
ITopicSelector | topics, | ||
TC | context, | ||
ISubscriptionByFilterContextCallback< TC > | callback | ||
) |
Subscribe to all sessions that satisfy a given session filter to topics.
TC | The context object type. |
filter | The session filter expression. |
topics | Identifies the topics to subscribe to. |
context | Passed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null. |
callback | Provides callback methods to indicate success or failure. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.Unsubscribe | ( | ISessionId | client, |
string | topics, | ||
ISubscriptionCallback | callback | ||
) |
Send a request to unsubscribe a client from a topic or topics.
client | Identifies the client to unsubscribe. |
topics | The topics to unsubscribe from.. |
callback | Provides callback methods indicating the status of this operation. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.Unsubscribe | ( | ISessionId | client, |
ITopicSelector | topics, | ||
ISubscriptionCallback | callback | ||
) |
Send a request to unsubscribe a client from a topic or topics.
client | Identifies the client to unsubscribe. |
topics | The topics specified as an ITopicSelector expression. |
callback | Provides callback methods indicating the status of this operation. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.Unsubscribe< TC > | ( | ISessionId | client, |
string | topics, | ||
TC | context, | ||
ISubscriptionContextCallback< TC > | callback | ||
) |
Send a request to unsubscribe a client from a topic or topics.
TC | The context object type. |
client | Identifies the client to unsubscribe. |
topics | The topics to unsubscribe. |
context | Passed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null. |
callback | Provides callback methods indicating the status of this operation. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.Unsubscribe< TC > | ( | ISessionId | client, |
ITopicSelector | topics, | ||
TC | context, | ||
ISubscriptionContextCallback< TC > | callback | ||
) |
Send a request to unsubscribe a client from a topic or topics.
TC | The context object type. |
client | Identifies the client to unsubscribe. |
topics | The topics specified as an ITopicSelector expression. |
context | Passed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null. |
callback | Provides callback methods indicating the status of this operation. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.UnsubscribeByFilter | ( | string | filter, |
string | topics, | ||
ISubscriptionByFilterCallback | callback | ||
) |
Unsubscribe all sessions that satisfy a given session filter from topics.
filter | The session filter expression. |
topics | The topics to unsubscribe specified as a TopicSelector |
expression.
callback | Provides callback methods indicating the status of this operation. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.UnsubscribeByFilter | ( | string | filter, |
ITopicSelector | topics, | ||
ISubscriptionByFilterCallback | callback | ||
) |
Unsubscribe all sessions that satisfy a given session filter from topics.
filter | The session filter expression. |
topics | The topics to unsubscribe from. |
callback | Provides callback methods indicating the status of this operation. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.UnsubscribeByFilter< TC > | ( | string | filter, |
string | topics, | ||
TC | context, | ||
ISubscriptionByFilterContextCallback< TC > | callback | ||
) |
Unsubscribe all sessions that satisfy a given session filter from topics.
TC | The context object type. |
filter | The session filter expression. |
topics | The topics to unsubscribe specified as a TopicSelector |
expression.
context | Passed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null. |
callback | Provides callback methods indicating the status of this operation. |
void PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl.UnsubscribeByFilter< TC > | ( | string | filter, |
ITopicSelector | topics, | ||
TC | context, | ||
ISubscriptionByFilterContextCallback< TC > | callback | ||
) |
Unsubscribe all sessions that satisfy a given session filter from topics.
TC | The context object type. |
filter | The session filter expression. |
topics | The topics to unsubscribe from. |
context | Passed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null. |
callback | Provides callback methods indicating the status of this operation. |