Show / Hide Table of Contents

Class SoMessageHandler

Base class for dealing with messaging

Inheritance
Object
SoMessageHandler
SoMessageBroker
SoMessageClient
SoMessageServer
Implements
IDisposable
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.Messaging
Assembly: SoDataBase.dll
Syntax
public abstract class SoMessageHandler : IDisposable

Constructors

SoMessageHandler(String)

Default constructor called by the implementations of message handlers.

Declaration
protected SoMessageHandler(string info)
Parameters
Type Name Description
String info

Information about the massage handlers.

Properties

SourceId

Source ID of the client.

Declaration
public virtual Guid SourceId { get; }
Property Value
Type Description
Guid

Methods

AcknowledgeAliveMessage(SoAliveMessage, EndPoint, Int32)

Acknowledge an alive message.

Declaration
protected void AcknowledgeAliveMessage(SoAliveMessage aliveMessage, EndPoint source, int sourcePort)
Parameters
Type Name Description
SoAliveMessage aliveMessage

Alive message to acknowledge.

EndPoint source

Source where the alive message comes from.

Int32 sourcePort

Source port the current client is listening to.

Remarks

An ackjnowledge message will be returned to the sender of the alive message.

AcknowledgeAliveMessage(SoMessageHeader, EndPoint, Byte[], Int32)

Acknowledge an alive message.

Declaration
protected void AcknowledgeAliveMessage(SoMessageHeader header, EndPoint source, byte[] rawMessage, int sourcePort)
Parameters
Type Name Description
SoMessageHeader header

Header of the alive message.

EndPoint source

Source where the alive message comes from.

Byte[] rawMessage

Entire alive message in raw format.

Int32 sourcePort

Source port the current client is listening to.

Dispose()

Dispose the message handler.

Declaration
public virtual void Dispose()

Save<TMessage>(TMessage)

Base class for dealing with messaging

Declaration
protected void Save<TMessage>(TMessage message)
    where TMessage : SoMessageHeader, new()
Parameters
Type Name Description
TMessage message
Type Parameters
Name Description
TMessage

Send(Byte[], IPEndPoint)

Send a raw message over the message buss.

Declaration
protected void Send(byte[] data, IPEndPoint destination)
Parameters
Type Name Description
Byte[] data

Data tp be sent over the message bus.

IPEndPoint destination

Send<TMessage>(TMessage)

Send a message on the message bus.

Declaration
public abstract void Send<TMessage>(TMessage message)
    where TMessage : SoMessageHeader, new()
Parameters
Type Name Description
TMessage message

Message to send.

Type Parameters
Name Description
TMessage

Type of message to send.

Send<TMessage>(TMessage, IPEndPoint)

Send a message over the emssage bus.

Declaration
public void Send<TMessage>(TMessage message, IPEndPoint destination)
    where TMessage : SoMessageHeader, new()
Parameters
Type Name Description
TMessage message

Message to send.

IPEndPoint destination

Destination for the message.

Type Parameters
Name Description
TMessage

Type of message to send.

Implements

IDisposable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top