DiffusionTM Publisher API 6.3.8
public interface RoutingTopicData extends TopicData
TopicDatathat allows one topic to route its subscriptions through to one or more other topics and for messages published on those topics to be routed back through the routing topic.
The result is that a client may subscribe to a topic which is in reality supported by another topic and the mapping of the routing topic to the actual topic can be different for each client.
As an example of use you may wish for all clients to simply subscribe to a topic called "Prices" but depending upon the client type the actual topic could differ (Prices/Discount, Prices/Standard etc).
An instance of this data may map any number of clients to any number of
different 'real' topics. Each real topic must have
To obtain current state from such data
must be used.
An instance of this data may be created using
|Modifier and Type||Method and Description|
Get the list of clients that are mapped to a particular topic.
Get the list of topics that this routing topic maps to.
Returns the routing handler.
Returns the real topic mapped to for a particular client.
This may be used to subscribe a client to the routing topic, bypassing any authorisation checks.
void subscribe(TopicClient client, Topic topic) throws APIException
This should only be used after a
RoutingTopicDataSubscriptionHandler has delegated subscription
checks to some asynchronous process and the client now may be subscribed.
This has the effect of subscribing the client to the routing topic but backed by the specified topic.
clientId- the client identifier.
List<Topic> getMappedTopics() throws APIException
APIException- if unable to lock the data in order to obtain the list.
List<TopicClient> getClientsForTopic(Topic topic) throws APIException
topic- the topic
APIException- if unable to lock the data in order to obtain the list
Copyright © 2020 Push Technology Ltd. All Rights Reserved.