Skip to main content

Class: ConnectorAnnounceEvent

Defined in: src/common/web/api/connector/ConnectorEvents.ts:34

Emitted by a connector to let the server know about its existence.

Extends​

Constructors​

Constructor​

new ConnectorAnnounceEvent(name, origin, sender, target, hops, trace, apiKey): ConnectorAnnounceEvent

Defined in: src/common/web/core/messaging/Message.ts:63

Parameters​

name​

string

The name of the message.

origin​

UnitID

The initial source component of the message.

sender​

UnitID

The component from where the message came from.

target​

Channel

Where the message should go to.

hops​

UnitID[] = []

A list of components the message was sent through.

trace​

string = ...

A unique trace identifying messages that logically belong together.

apiKey​

string = ""

An optional API key to access protected resources.

Returns​

ConnectorAnnounceEvent

Inherited from​

Event.constructor

Properties​

api_key​

readonly api_key: string = ""

Defined in: src/common/web/core/messaging/Message.ts:50

Inherited from​

Event.api_key


authorization_private​

readonly authorization_private: AuthorizationSettings

Defined in: src/common/web/api/connector/ConnectorEvents.ts:42


authorization_public​

readonly authorization_public: AuthorizationSettings

Defined in: src/common/web/api/connector/ConnectorEvents.ts:41


category​

readonly category: string = ""

Defined in: src/common/web/api/connector/ConnectorEvents.ts:39


connector_id​

readonly connector_id: string = ""

Defined in: src/common/web/api/connector/ConnectorEvents.ts:35


description​

readonly description: string = ""

Defined in: src/common/web/api/connector/ConnectorEvents.ts:38


display_name​

readonly display_name: string = ""

Defined in: src/common/web/api/connector/ConnectorEvents.ts:37


hops​

readonly hops: UnitID[] = []

Defined in: src/common/web/core/messaging/Message.ts:46

Inherited from​

Event.hops


logos​

readonly logos: ConnectorLogos

Defined in: src/common/web/api/connector/ConnectorEvents.ts:47


metadata_profiles​

readonly metadata_profiles: MetadataProfileContainerList = []

Defined in: src/common/web/api/connector/ConnectorEvents.ts:51


name​

readonly name: string

Defined in: src/common/web/core/messaging/Message.ts:33

Inherited from​

Event.name


options​

readonly options: ConnectorOptions = ConnectorOptions.Default

Defined in: src/common/web/api/connector/ConnectorEvents.ts:43


origin​

readonly origin: UnitID

Defined in: src/common/web/core/messaging/Message.ts:36

Inherited from​

Event.origin


payload​

readonly payload: MessagePayload

Defined in: src/common/web/core/messaging/Message.ts:52

Inherited from​

Event.payload


sender​

readonly sender: UnitID

Defined in: src/common/web/core/messaging/Message.ts:39

Inherited from​

Event.sender


target​

readonly target: Channel

Defined in: src/common/web/core/messaging/Message.ts:42

Inherited from​

Event.target


trace​

readonly trace: string = ""

Defined in: src/common/web/core/messaging/Message.ts:48

Inherited from​

Event.trace


Category​

readonly static Category: string = "Event"

Defined in: src/common/web/core/messaging/Event.ts:9

Inherited from​

Event.Category

Accessors​

messageCategory​

Get Signature​

get messageCategory(): string

Defined in: src/common/web/core/messaging/Event.ts:14

Gets the global message category.

Returns​

string

Inherited from​

Event.messageCategory

Methods​

convertToJSON()​

convertToJSON(): string

Defined in: src/common/web/core/messaging/Message.ts:76

Converts this message to JSON.

Returns​

string

Inherited from​

Event.convertToJSON


toString()​

toString(): string

Defined in: src/common/web/core/messaging/Message.ts:154

Gets the string representation of this message.

Returns​

string

Inherited from​

Event.toString


build()​

static build(messageBuilder, connectorID, name, description, category, authorizationPublic, authorizationPrivate, options, logos, metadataProfiles, chain): EventComposer<ConnectorAnnounceEvent>

Defined in: src/common/web/api/connector/ConnectorEvents.ts:56

Helper function to easily build this message.

Parameters​

messageBuilder​

MessageBuilder

connectorID​

string

name​

string

description​

string

category​

string

authorizationPublic​

AuthorizationSettings

authorizationPrivate​

AuthorizationSettings

options​

ConnectorOptions

logos​

ConnectorLogos

metadataProfiles​

MetadataProfileContainerList

chain​

null | Message

Returns​

EventComposer<ConnectorAnnounceEvent>


convertFromJSON()​

static convertFromJSON(msgType, data): Message

Defined in: src/common/web/core/messaging/Message.ts:93

Creates a message from JSON data.

Parameters​

msgType​

ConstructableMessage

The message type to construct.

data​

string

The JSON data string.

Returns​

Message

  • The created message.

Inherited from​

Event.convertFromJSON


define()​

static define(name): Function

Defined in: src/common/web/core/messaging/Message.ts:128

Defines a new message.

The decorator takes care of wrapping the new class as a dataclass, passing the correct message name to its constructor. It also registers the new message type in the global MessageTypesCatalog.

Examples:

    @Message.define("msg/command")
class MyCommand extends Command {
...
}

Parameters​

name​

string

The name of the message.

Returns​

Function

Inherited from​

Event.define


isProtected()​

static isProtected(): boolean

Defined in: src/common/web/core/messaging/Message.ts:108

The frontend never receives or issues protected messages.

Returns​

boolean

Inherited from​

Event.isProtected


messageName()​

static messageName(): string

Defined in: src/common/web/core/messaging/Message.ts:101

Retrieves the name of the message type on a message class basis.

Returns​

string

Inherited from​

Event.messageName