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

This is the base class for all Diffusion messages. More...

Inheritance diagram for PushTechnology.DiffusionCore.Messaging.MessageBase:
PushTechnology.DiffusionCore.Messaging.IMessageComparable PushTechnology.DiffusionCore.Messaging.MessageImpl PushTechnology.DiffusionCore.Messaging.DataMessageImpl PushTechnology.DiffusionCore.Messaging.Topic.TopicMessageImpl PushTechnology.DiffusionCore.Messaging.DeltaMessage PushTechnology.DiffusionCore.Messaging.DeltaMessageAck PushTechnology.DiffusionCore.Messaging.FetchReplyMessage PushTechnology.DiffusionCore.Messaging.Topic.TopicLoadMessage PushTechnology.DiffusionCore.Messaging.TopicLoadMessageAck PushTechnology.DiffusionCore.Messaging.CommandMessage PushTechnology.DiffusionCore.Messaging.CommandNotificationMessage PushTechnology.DiffusionCore.Messaging.CommandLoadMessage

Public Member Functions

abstract bool IsTopicMessage ()
 
virtual bool IsAckRequired ()
 
abstract void SetHeaders (params string[] headers)
 Sets user-defined headers. One or more separate headers may be set as required. Headers may be set once and only once after constructing a message and before any data is added to the message. More...
 
abstract void SetHeaders (List< string > headers)
 
abstract List< string > GetHeaders ()
 Returns a list of user-defined headers. More...
 
abstract string GetHeader (int index)
 Returns a header value. More...
 
virtual int Size ()
 
abstract int Capacity ()
 This returns the capacity of the message. More...
 
abstract int CompareTo (IMessage message)
 Compares the current object with another object of the same type. More...
 
abstract int CompareTo (IMessage message, MessageComparator comparator)
 Compares this message to another message using a specified comparator. More...
 

Static Public Attributes

static byte MESSAGE_DELIMITER
 Message delimiter. More...
 
static char MESSAGE_DELIMITER_CHAR = (char) 0x00
 Message delimiter character. More...
 
static byte RECORD_DELIMITER = 0x01
 Record delimiter. More...
 
static char RECORD_DELIMITER_CHAR = (char) 0x01
 Record delimiter character. More...
 
static byte FIELD_DELIMITER = 0x02
 Field delimiter. More...
 
static char FIELD_DELIMITER_CHAR = (char) 0x02
 Field delimiter character. More...
 
static byte MESSAGE_SEPARATOR = 0x08
 Message separator. More...
 
static char MESSAGE_SEPARATOR_CHAR = (char) 0x08
 Message separator character. More...
 
static char EMPTY_FIELD_CHAR = (char) 0x03
 Empty field character. More...
 
static string EMPTY_FIELD_STRING = EMPTY_FIELD_CHAR.ToString(CultureInfo.InvariantCulture)
 Empty field string. More...
 
static byte LIST_DELIMITER = 0x06
 Byte value reserved for use as a list delimiter used for separating the elements of a list in character-based messages. More...
 
static char LIST_DELIMITER_CHAR = (char) LIST_DELIMITER
 Character representation of LIST_DELIMITER. More...
 
static string LIST_DELIMITER_STRING = LIST_DELIMITER_CHAR.ToString(CultureInfo.InvariantCulture)
 String representation of LIST_DELIMITER. Useful for string.Join operations. More...
 

Properties

abstract long Timestamp [get, set]
 
abstract bool IsLocked [get, set]
 

Detailed Description

This is the base class for all Diffusion messages.

Member Function Documentation

abstract int PushTechnology.DiffusionCore.Messaging.MessageBase.Capacity ( )
pure virtual

This returns the capacity of the message.

This is the maximum size that the message may reach (in bytes) including any headers.

Returns
The maximum size that the message may reach.

Implemented in PushTechnology.DiffusionCore.Messaging.DataMessageImpl.

abstract int PushTechnology.DiffusionCore.Messaging.MessageBase.CompareTo ( IMessage  message)
pure virtual

Compares the current object with another object of the same type.

Returns
A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the message parameter. Zero This object is equal to message . Greater than zero This object is greater than message .
Parameters
messageAn object to compare with this object.

Implemented in PushTechnology.DiffusionCore.Messaging.MessageImpl, and PushTechnology.DiffusionCore.Messaging.Topic.TopicMessageImpl.

abstract int PushTechnology.DiffusionCore.Messaging.MessageBase.CompareTo ( IMessage  message,
MessageComparator  comparator 
)
pure virtual

Compares this message to another message using a specified comparator.

Parameters
message
comparator
Returns

Implements PushTechnology.DiffusionCore.Messaging.IMessageComparable.

Implemented in PushTechnology.DiffusionCore.Messaging.MessageImpl.

abstract string PushTechnology.DiffusionCore.Messaging.MessageBase.GetHeader ( int  index)
pure virtual

Returns a header value.

Parameters
indexThe header index (first header has index 0)
Returns
The header value or null if there is no header with the given index.

Implemented in PushTechnology.DiffusionCore.Messaging.MessageImpl.

abstract List<string> PushTechnology.DiffusionCore.Messaging.MessageBase.GetHeaders ( )
pure virtual

Returns a list of user-defined headers.

Returns

Implemented in PushTechnology.DiffusionCore.Messaging.MessageImpl.

virtual bool PushTechnology.DiffusionCore.Messaging.MessageBase.IsAckRequired ( )
virtual
abstract void PushTechnology.DiffusionCore.Messaging.MessageBase.SetHeaders ( params string[]  headers)
pure virtual

Sets user-defined headers. One or more separate headers may be set as required. Headers may be set once and only once after constructing a message and before any data is added to the message.

Parameters
headersA list of user-defined header values.

Implemented in PushTechnology.DiffusionCore.Messaging.DataMessageImpl, and PushTechnology.DiffusionCore.Messaging.MessageImpl.

abstract void PushTechnology.DiffusionCore.Messaging.MessageBase.SetHeaders ( List< string >  headers)
pure virtual

Sets user-defined headers. One or more separate headers may be set as required. Headers may be set once and only once after constructing a message and before any data is added to the message.

Parameters
headersA list of user-defined header values.

Implemented in PushTechnology.DiffusionCore.Messaging.DataMessageImpl, and PushTechnology.DiffusionCore.Messaging.MessageImpl.

virtual int PushTechnology.DiffusionCore.Messaging.MessageBase.Size ( )
virtual

Member Data Documentation

char PushTechnology.DiffusionCore.Messaging.MessageBase.EMPTY_FIELD_CHAR = (char) 0x03
static

Empty field character.

string PushTechnology.DiffusionCore.Messaging.MessageBase.EMPTY_FIELD_STRING = EMPTY_FIELD_CHAR.ToString(CultureInfo.InvariantCulture)
static

Empty field string.

byte PushTechnology.DiffusionCore.Messaging.MessageBase.FIELD_DELIMITER = 0x02
static

Field delimiter.

char PushTechnology.DiffusionCore.Messaging.MessageBase.FIELD_DELIMITER_CHAR = (char) 0x02
static

Field delimiter character.

byte PushTechnology.DiffusionCore.Messaging.MessageBase.LIST_DELIMITER = 0x06
static

Byte value reserved for use as a list delimiter used for separating the elements of a list in character-based messages.

char PushTechnology.DiffusionCore.Messaging.MessageBase.LIST_DELIMITER_CHAR = (char) LIST_DELIMITER
static

Character representation of LIST_DELIMITER.

string PushTechnology.DiffusionCore.Messaging.MessageBase.LIST_DELIMITER_STRING = LIST_DELIMITER_CHAR.ToString(CultureInfo.InvariantCulture)
static

String representation of LIST_DELIMITER. Useful for string.Join operations.

byte PushTechnology.DiffusionCore.Messaging.MessageBase.MESSAGE_DELIMITER
static

Message delimiter.

char PushTechnology.DiffusionCore.Messaging.MessageBase.MESSAGE_DELIMITER_CHAR = (char) 0x00
static

Message delimiter character.

byte PushTechnology.DiffusionCore.Messaging.MessageBase.MESSAGE_SEPARATOR = 0x08
static

Message separator.

char PushTechnology.DiffusionCore.Messaging.MessageBase.MESSAGE_SEPARATOR_CHAR = (char) 0x08
static

Message separator character.

byte PushTechnology.DiffusionCore.Messaging.MessageBase.RECORD_DELIMITER = 0x01
static

Record delimiter.

char PushTechnology.DiffusionCore.Messaging.MessageBase.RECORD_DELIMITER_CHAR = (char) 0x01
static

Record delimiter character.

Property Documentation

abstract bool PushTechnology.DiffusionCore.Messaging.MessageBase.IsLocked
getset

abstract long PushTechnology.DiffusionCore.Messaging.MessageBase.Timestamp
getset