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

This is the default Message Comparator for Topic Messages. More...

Inheritance diagram for PushTechnology.DiffusionCore.Messaging.Topic.TopicMessageComparator:
PushTechnology.DiffusionCore.Messaging.MessageComparator

Public Member Functions

override int Compare (IMessage message1, IMessage message2)
 This overrides the base class method to provide processing specific to Topic Messages. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PushTechnology.DiffusionCore.Messaging.MessageComparator
virtual int CompareMessage (IMessage message1, IMessage message2)
 Compares two (non null) messages. The default implementation returns 0 only if the two parameters represent the same object. Otherwise time stamps are compared and 1 is returned if message1 time stamp is greater than or equal to message2 time stamp and -1 if message1 time stamp is less than message2 time stamp. More...
 

Detailed Description

This is the default Message Comparator for Topic Messages.

This may be extended to provide different comparison functionality and either used directly for message comparisons or set for a topic using TopicMessageComparators.

Member Function Documentation

override int PushTechnology.DiffusionCore.Messaging.Topic.TopicMessageComparator.Compare ( IMessage  message1,
IMessage  message2 
)
virtual

This overrides the base class method to provide processing specific to Topic Messages.

If both message parameters represent the same object then 0 is returned.

If either message is not an instance of TopicLoadMessage then processing is passed to the superclass.

If both messages are instances of TopicLoadMessage then comparison is as follows:-

If both messages have the same topic then processing is delegated to the compareTopicMessage.

If the messages have different topics then -1 is returned if the topic name of message1 is lexically less than the topic name of message2 otherwise 1 is returned.

In normal circumstances this method should not be overridden.

Parameters
message1
message2
Returns

Reimplemented from PushTechnology.DiffusionCore.Messaging.MessageComparator.