Table of Contents

Class MessageComposer

Namespace
Inetlab.SMPP.Common
Assembly
Inetlab.SMPP.dll

Helps to combine concatenated segments into complete message text.

public class MessageComposer
Inheritance
MessageComposer
Inherited Members

Constructors

MessageComposer()

public MessageComposer()

MessageComposer(IComposerItemStore)

public MessageComposer(IComposerItemStore itemStore)

Parameters

itemStore IComposerItemStore

Properties

Items

Gets the items that contains message parts.

[Obsolete("Will be removed in version 3.0. You can use methods from IComposerItemStore implementation.")]
public IEnumerable<ComposerItem> Items { get; }

Property Value

IEnumerable<ComposerItem>

The items array.

Timeout

Gets or sets time interval for waiting next segment of the message. Default is 60 seconds.

public TimeSpan Timeout { get; set; }

Property Value

TimeSpan

Methods

AddMessage<TSmppMessage>(TSmppMessage)

Adds concatenated message part.

public void AddMessage<TSmppMessage>(TSmppMessage message) where TSmppMessage : SmppRequest, IConcatenation

Parameters

message TSmppMessage

The message.

Type Parameters

TSmppMessage

Type of the smpp message.

Clear()

Removes all saved message parts.

[Obsolete("Will be removed in version 3.0. You can use methods from IComposerItemStore implementation.")]
public void Clear()

GetFullMessage<TSmppMessage>(TSmppMessage)

Gets full message for any part

public string GetFullMessage<TSmppMessage>(TSmppMessage message) where TSmppMessage : SmppRequest, IConcatenation

Parameters

message TSmppMessage

The message.

Returns

string

The full message text or the text with inclusions "<MISSING PART>" on the places of missing parts.

Type Parameters

TSmppMessage

Generic type parameter of SMPP message.

Remarks

This method deletes corresponding ComposerItem from MessageComposer when all message parts are received.

IsLastSegment<TSmppMessage>(TSmppMessage)

Check if PDU is last segment in the concatenated message.

public bool IsLastSegment<TSmppMessage>(TSmppMessage message) where TSmppMessage : SmppRequest, IConcatenation

Parameters

message TSmppMessage

The message.

Returns

bool

True if last segment, false if not.

Type Parameters

TSmppMessage

Generic type parameter of SMPP message.

Events

evFullMessageReceived

Occurs when all message segments received. Contains concatenated message text.

public event MessageEventHandler evFullMessageReceived

Event Type

MessageEventHandler

evFullMessageTimeout

Occurs when all message segments were not received during Timeout.

public event MessageEventHandler evFullMessageTimeout

Event Type

MessageEventHandler