Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Messaging.Topic.TopicAliasing Class Reference

This provides maps of Topic aliases to Topic Names for a given VM. This is used in a Topic Provider VM (Publisher or Publisher Server) to record the mappings of Topic Names to aliases. In a normal Client VM it is never populated. An alias is set up for a Topic when the Topic is first created. However, aliases are NOT deleted, even when the Topic goes away. This deliberate so that if a topic is removed and then recreated it would have the same alias which is necessary because a client is not informed when a Topic goes away and therefore could preserve an invalid alias. More...

Static Public Member Functions

static void MapTopicAlias (string topicName)
 This is used to map a topic to an alias and need only be called once for a topic within a session. However, if it is called again it does not matter. It will set up a permanent local alias for the topic. More...
 
static string GetTopicLoadHeaderValue (string topicName)
 Returns a topic load header for a topic name. More...
 
static string GetAlias (string topicName)
 Returns the topic name for a given alias. More...
 
static string GetTopicName (string alias)
 Returns the topic named for a given alias. More...
 
static void Clear ()
 Clears down maps. More...
 

Static Public Attributes

static string aliasPrefix = "!"
 The prefix for aliased messages. More...
 

Detailed Description

This provides maps of Topic aliases to Topic Names for a given VM. This is used in a Topic Provider VM (Publisher or Publisher Server) to record the mappings of Topic Names to aliases. In a normal Client VM it is never populated. An alias is set up for a Topic when the Topic is first created. However, aliases are NOT deleted, even when the Topic goes away. This deliberate so that if a topic is removed and then recreated it would have the same alias which is necessary because a client is not informed when a Topic goes away and therefore could preserve an invalid alias.

Member Function Documentation

static void PushTechnology.DiffusionCore.Messaging.Topic.TopicAliasing.Clear ( )
static

Clears down maps.

static string PushTechnology.DiffusionCore.Messaging.Topic.TopicAliasing.GetAlias ( string  topicName)
static

Returns the topic name for a given alias.

Parameters
topicNameThe alias.
Returns
The topic name, or null if not mapped.
static string PushTechnology.DiffusionCore.Messaging.Topic.TopicAliasing.GetTopicLoadHeaderValue ( string  topicName)
static

Returns a topic load header for a topic name.

When aliasing, it will get or generate an alias for the topic name and return the topic name suffixed by the alias. When not aliasing it will simply return the topic name.

Parameters
topicName
Returns
The alias, or topic name if aliasing is not enabled.
static string PushTechnology.DiffusionCore.Messaging.Topic.TopicAliasing.GetTopicName ( string  alias)
static

Returns the topic named for a given alias.

Parameters
aliasThe alias.
Returns
The topic name, or null if not mapped.
static void PushTechnology.DiffusionCore.Messaging.Topic.TopicAliasing.MapTopicAlias ( string  topicName)
static

This is used to map a topic to an alias and need only be called once for a topic within a session. However, if it is called again it does not matter. It will set up a permanent local alias for the topic.

Parameters
topicName

Member Data Documentation

string PushTechnology.DiffusionCore.Messaging.Topic.TopicAliasing.aliasPrefix = "!"
static

The prefix for aliased messages.