For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-editor/classes/BedrockEventSubscriptionCache.md.

Class: BedrockEventSubscriptionCache

event

Beta

A cache for bedrock event subscriptions. Stores off a subscription by event key, and upon teardown unregisters all subscriptions.

Constructors

Constructor

new BedrockEventSubscriptionCache(mEvents): BedrockEventSubscriptionCache

Beta

Parameters

mEvents

WorldAfterEvents

Returns

BedrockEventSubscriptionCache

Remarks

Constructs a new instance of the BedrockEventSubscriptionCache class

Methods

subscribeToBedrockEvent()

subscribeToBedrockEvent<T>(event, ...params): any

Beta

Type Parameters

T

T extends string | number | symbol

Parameters

event

T

The event on the bedrock APIs to which to subscribe

params

...unknown[]

The parameters to the subscription method for the event. Auto complete will display this for you

Returns

any

Remarks

Subcribes to a bedrock event using the key of the desired event. When subscribed, the event handler is both returned, but also cached internally for unsubscription. This means the caller of the subscription does not need to worry about unsubscription since the cache will automatically unsubscribe handlers on overall teardown.


teardown()

teardown(): void

Beta

Returns

void

Remarks

Cleans up the set of internal registrations and subscriptions.

同领域相关