Diffusion .NET Client Library  6.1.5
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl Interface Reference

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...

Inheritance diagram for PushTechnology.ClientInterface.Client.Features.Control.Topics.ISubscriptionControl:
PushTechnology.ClientInterface.Client.Features.IFeature

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...
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
topicPathIdentifies a topic node to associate the handler with.
handlerSpecifies 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.

Parameters
clientIdentifies the client to subscribe.
topicsThe topics to subscribe to.
callbackProvides 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.

Parameters
clientIdentifies the client to subscribe.
topicsthe topics to subscribe to, specified as a topic selector expression.
callbackProvides 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.

Parameters
clientIdentifies the client to subscribe.
topicsThe topics to subscribe to.
contextPassed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null.
callbackProvides 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'.

Parameters
clientIdentifies the client to subscribe.
topicsThe topics to subscribe to.
contextPassed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null.
callbackProvides 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.

Parameters
filterThe session filter expression.
topicsThe topics to subscribe to specified as a TopicSelector

expression.

Parameters
callbackProvides 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.

Parameters
filterThe session filter expression.
topicsIdentifies the topics to subscribe to.
callbackProvides 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.

Template Parameters
TCThe context object type.
Parameters
filterThe session filter expression.
topicsThe topics to subscribe to specified as a TopicSelector

expression.

Parameters
contextPassed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null.
callbackProvides 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.

Template Parameters
TCThe context object type.
Parameters
filterThe session filter expression.
topicsIdentifies the topics to subscribe to.
contextPassed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null.
callbackProvides 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.

Parameters
clientIdentifies the client to unsubscribe.
topicsThe topics to unsubscribe from..
callbackProvides 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.

Parameters
clientIdentifies the client to unsubscribe.
topicsThe topics specified as an ITopicSelector expression.
callbackProvides 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.

Template Parameters
TCThe context object type.
Parameters
clientIdentifies the client to unsubscribe.
topicsThe topics to unsubscribe.
contextPassed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null.
callbackProvides 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.

Template Parameters
TCThe context object type.
Parameters
clientIdentifies the client to unsubscribe.
topicsThe topics specified as an ITopicSelector expression.
contextPassed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null.
callbackProvides 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.

Parameters
filterThe session filter expression.
topicsThe topics to unsubscribe specified as a TopicSelector

expression.

Parameters
callbackProvides 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.

Parameters
filterThe session filter expression.
topicsThe topics to unsubscribe from.
callbackProvides 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.

Template Parameters
TCThe context object type.
Parameters
filterThe session filter expression.
topicsThe topics to unsubscribe specified as a TopicSelector

expression.

Parameters
contextPassed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null.
callbackProvides 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.

Template Parameters
TCThe context object type.
Parameters
filterThe session filter expression.
topicsThe topics to unsubscribe from.
contextPassed to the callback with the reply to allow requests and replies to be correlated. The caller may use any convenient object reference, including null.
callbackProvides callback methods indicating the status of this operation.

The documentation for this interface was generated from the following file: