Class: ExternalApplication

ExternalApplication

An ExternalApplication object representing native language adapter connections to the runtime. Allows the developer to listen to application events. Discovery of connections is provided by getAllExternalApplications.

Methods

(static) wrap(uuid) → {Promise.<ExternalApplication>}

Asynchronously returns an External Application object that represents an existing external application.

Parameters:
Name Type Description
uuid string

The UUID of the external application to be wrapped

Tutorials:
Returns:
Type
Promise.<ExternalApplication>

(static) wrapSync(uuid) → {ExternalApplication}

Synchronously returns an External Application object that represents an existing external application.

Parameters:
Name Type Description
uuid string

The UUID of the external application to be wrapped

Tutorials:
Returns:
Type
ExternalApplication

addListener(eventType, listener, optionsopt) → {Promise.<this>}

Adds a listener to the end of the listeners array for the specified event.

Parameters:
Name Type Attributes Description
eventType string | symbol

The type of the event.

listener function

Called whenever an event of the specified type occurs.

options SubOptions <optional>

Option to support event timestamps.

Tutorials:
Returns:
Type
Promise.<this>

getInfo() → {Promise.<ExternalApplicationInfo>}

Retrieves information about the external application.

Tutorials:
Returns:
Type
Promise.<ExternalApplicationInfo>

on(eventType, listener, optionsopt) → {Promise.<this>}

Adds a listener to the end of the listeners array for the specified event.

Parameters:
Name Type Attributes Description
eventType string | symbol

The type of the event.

listener function

Called whenever an event of the specified type occurs.

options SubOptions <optional>

Option to support event timestamps.

Tutorials:
Returns:
Type
Promise.<this>

once(eventType, listener, optionsopt) → {Promise.<this>}

Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.

Parameters:
Name Type Attributes Description
eventType string | symbol

The type of the event.

listener function

The callback function.

options SubOptions <optional>

Option to support event timestamps.

Tutorials:
Returns:
Type
Promise.<this>

prependListener(eventType, listener, optionsopt) → {Promise.<this>}

Adds a listener to the beginning of the listeners array for the specified event.

Parameters:
Name Type Attributes Description
eventType string | symbol

The type of the event.

listener function

The callback function.

options SubOptions <optional>

Option to support event timestamps.

Tutorials:
Returns:
Type
Promise.<this>

prependOnceListener(eventType, listener, optionsopt) → {Promise.<this>}

Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed. The listener is added to the beginning of the listeners array.

Parameters:
Name Type Attributes Description
eventType string | symbol

The type of the event.

listener function

The callback function.

options SubOptions <optional>

Option to support event timestamps.

Tutorials:
Returns:
Type
Promise.<this>

removeAllListeners(eventTypeopt) → {Promise.<this>}

Removes all listeners, or those of the specified event.

Parameters:
Name Type Attributes Description
eventType string | symbol <optional>

The type of the event.

Tutorials:
Returns:
Type
Promise.<this>

removeListener(eventType, listener, optionsopt) → {Promise.<this>}

Remove a listener from the listener array for the specified event. Caution: Calling this method changes the array indices in the listener array behind the listener.

Parameters:
Name Type Attributes Description
eventType string | symbol

The type of the event.

listener function

The callback function.

options SubOptions <optional>

Option to support event timestamps.

Tutorials:
Returns:
Type
Promise.<this>