Expand all

mw.echo.api.NetworkHandler

Constructor

new mw.echo.api.NetworkHandler(config) #

Network handler for echo notifications. Manages multiple APIHandlers according to their sources.

Parameters:

Name Type Description
config Object

Configuration options

Source:
Network handler for echo notifications.

Methods

getApiHandler(name) → {mw.echo.api.APIHandler|undefined} #

Get the API handler that matches the symbolic name

Parameters:

Name Type Description
name string

Symbolic name of the API handler

Source:

Returns:

API handler, if exists

Type
mw.echo.api.APIHandler | undefined
Get the API handler that matches the symbolic name

setApiHandler(name, handler) #

Set an API handler by passing in an instance of an mw.echo.api.APIHandler subclass directly.

Parameters:

Name Type Description
name string

Symbolic name

handler mw.echo.api.APIHandler

Handler object

Source:

Throws:

If handler already exists

Type
Error
Set an API handler by passing in an instance of an mw.echo.api.APIHandler subclass directly.