API Docs for: 2.6
Show:

server_com_ast_proxy_rest Class

Provides the REST server.

Methods

config

(
  • path
)

Configurates the REST server properties by the configuration file. The file must use the JSON syntax.

The method can throw an Exception.

Parameters:

  • path String

    The path of the configuration file

configPrivacy

(
  • path
)

Customize the privacy used to hide phone numbers by a configuration file. The file must use the JSON syntax.

The method can throw an Exception.

Parameters:

  • path String

    The path of the configuration file

execute

() private

Executed by all REST request. It calls the appropriate REST plugin function.

setAllRestPluginsAstProxy

(
  • ap
)
private

Sets the asterisk proxy component for all the REST plugins.

Parameters:

  • ap Object

    The asterisk proxy object.

setAllRestPluginsAuthorization

(
  • comp
)
private

Called by setCompAuthorization function for all REST plugins.

Parameters:

  • comp Object

    The architect authorization component

setAllRestPluginsCompConfigManager

(
  • comp
)
private

Sets the configuration manager for all the REST plugins.

Parameters:

  • comp Object

    The configuration manager

setAllRestPluginsCompOperator

(
  • comp
)
private

Sets the operator component for all the REST plugins.

Parameters:

  • comp Object

    The operator object

setAllRestPluginsCompUser

(
  • comp
)
private

Sets the user component for all the REST plugins.

Parameters:

  • comp Object

    The user object

setAllRestPluginsLogger

(
  • log
)
private

Call setLogger function for all REST plugins.

Parameters:

  • log Object

    The logger object.

setAllRestPluginsPrivacy

(
  • str
)
private

Calls setPrivacy function for all REST plugins.

Parameters:

  • str String

    The string used to hide last digits of phone numbers

setCompAstProxy

(
  • cap
)
static

Set the asterisk proxy architect component to be used by REST plugins.

Parameters:

  • cap Object

    The architect asterisk proxy component

setCompAuthorization

(
  • comp
)
static

Set the authorization architect component for all REST plugins.

Parameters:

  • comp Object

    The architect authorization component

setCompComNethctiRemotes

(
  • comp
)

Sets the component that communicates with remote sites.

Parameters:

  • comp Object

    The remote sites communication architect component.

setCompComNethctiWs

(
  • comp
)

Sets the component that communicates with clients using websocket.

Parameters:

  • comp Object

    The websocket communication architect component.

setCompConfigManager

(
  • comp
)

Set configuration manager architect component used by configuration functions.

Parameters:

  • comp Object

    The configuration manager architect component.

setCompOperator

(
  • comp
)
static

Set the operator architect component to be used by REST plugins.

Parameters:

  • comp Object

    The architect operator component

setCompUser

(
  • comp
)
static

Set the user architect component to be used by REST plugins.

Parameters:

  • comp Object

    The architect user component

setCompUtil

(
  • comp
)
static

Set the utility architect component to be used by REST plugins.

Parameters:

  • comp Object

    The architect utility component

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

start

() static

Start the REST server.

Properties

address

String private

Listening address of the REST server. It can be customized by the configuration file.

Default: "localhost"

IDLOG

String private final

The module identifier used by the logger.

Default: [server_com_ast_proxy_rest]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

port

String private

Listening port of the REST server. It can be customized by the configuration file.

server

Object private

The REST server.