delphirtl

delphirtlDocs


delphirtl / TMessageManager

Class: TMessageManager

TMessageManager enables messaging between different code points.

TMessageManager

Constructors

new TMessageManager()

new TMessageManager(): TMessageManager

Returns

TMessageManager

Defined in

src/messaging.ts:124

Messaging

sendMessage()

sendMessage<T>(aClass, aMessage): void

Sends the given message to listeners that subscribes to the given class.

Type Parameters

T extends MessageType

Parameters

aClass: SubscriptionIdentifierType

aMessage: T

Returns

void

Defined in

src/messaging.ts:181


subscribeToMessage()

subscribeToMessage<T>(aClass, aMessageListener): number

Subscribes to the given class and receives the given message

Type Parameters

T extends MessageType

Parameters

aClass: SubscriptionIdentifierType

aMessageListener

Returns

number

Defined in

src/messaging.ts:227


unsubscribe()

unsubscribe(aClass, aSubscriptionIndex): void

Unsubscribes from messages on the given class

Parameters

aClass: SubscriptionIdentifierType

aSubscriptionIndex: number

Returns

void

Defined in

src/messaging.ts:269


unsubscribeWrappedMessage()

unsubscribeWrappedMessage(aClass, aSubscriptionIndex): void

Unsubscribes from the wrapped message on the given class

Parameters

aClass: SubscriptionIdentifierType

aSubscriptionIndex: number

Returns

void

Defined in

src/messaging.ts:288

Other

disableType()

disableType(aType): void

Parameters

aType: SubscriptionIdentifierType

Returns

void

Defined in

src/messaging.ts:135


enableType()

enableType(aType): void

Parameters

aType: SubscriptionIdentifierType

Returns

void

Defined in

src/messaging.ts:140


ensureTypeEnabled()

ensureTypeEnabled(aSuffix): void

Parameters

aSuffix: string

Returns

void

Defined in

src/messaging.ts:153


reset()

reset(): void

Returns

void

Defined in

src/messaging.ts:128


sendWrappedMessage()

sendWrappedMessage<T>(aClass, aMessage): void

Sends a wrapped message to listeners on the given class

Type Parameters

T extends MessageType

Parameters

aClass: SubscriptionIdentifierType

aMessage: TMessage<T>

Returns

void

Defined in

src/messaging.ts:203


subscribeToWrappedMessage()

subscribeToWrappedMessage<T>(aClass, aMessageListener): number

Subscribes to the wrapped message on the given class

Type Parameters

T extends MessageType

Parameters

aClass: SubscriptionIdentifierType

aMessageListener

Returns

number

Defined in

src/messaging.ts:248


typesDisabled()

typesDisabled(): string[]

Returns

string[]

Defined in

src/messaging.ts:161


getDefaultManager()

static getDefaultManager(): TMessageManager

Returns

TMessageManager

Defined in

src/messaging.ts:165