Javascript Message

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with "Yate Message object == Constructor == * '''new Message(name)''' Where: * name - Name of the message to create (mandatory) == Static Methods == * '''Message.install()''' ...")
 
Line 4: Line 4:
  
 
* '''new Message(name)'''
 
* '''new Message(name)'''
Where:
+
* '''new Message(name,broadcast)'''
* name - Name of the message to create (mandatory)
+
Parameters:<br/>
 +
'''name''' - Name of the message to create (mandatory)
 +
'''broadcast''' - Optional boolean flag to create a broadcast message
  
 
== Static Methods ==
 
== Static Methods ==
Line 41: Line 43:
  
 
* '''enqueue()'''
 
* '''enqueue()'''
 +
Enqueues the Message in the Yate engine<br/>
 +
Return: True if enqueue succeeded, false on failure
  
  
 
* '''dispatch()'''
 
* '''dispatch()'''
 +
* '''dispatch(unblock)'''
 +
Parameters:<br/>
 +
'''unblock''' - Optional boolean flag to unblock context variables during dispatch<br/>
 +
Return: True if message was handled, false if it was not handled
  
  
 
* '''name()'''
 
* '''name()'''
 +
Return: String name of the message
  
  
 
* '''broadcast()'''
 
* '''broadcast()'''
 +
Return: Boolean broadcast flag
  
  
 
* '''retValue()'''
 
* '''retValue()'''
 +
Return: Returned value of the message
 +
 +
 +
* '''retValue(value)'''
 +
Parameters:<br/>
 +
'''value''' - New returned value to set in the message
  
  
 
* '''msgTime()'''
 
* '''msgTime()'''
 +
Return: Message creation time in milliseconds since EPOCH
  
  

Revision as of 15:58, 24 July 2014

Yate Message object

Constructor

  • new Message(name)
  • new Message(name,broadcast)

Parameters:
name - Name of the message to create (mandatory) broadcast - Optional boolean flag to create a broadcast message

Static Methods

  • Message.install()


  • Message.uninstall()


  • Message.handlers()
  • Message.handlers(match)

Parameters:
match - Optional string or RegExp used to match only some handler names
Return:
Array of objects describing installed handlers, null if no handler matches.

  • name - String name of the handled messages
  • priority - Integer priority of the installed handler
  • handler - String name of the handling function
  • filterName - String name of the filtering parameter (only if a filter is installed)
  • filterValue - String value of the filtering parameter (only if a filter is installed)
  • trackName - String name of the handler used in tracking (only if not empty)


  • Message.installHook()


  • Message.uninstallHook()


  • Message.trackName()


Methods

  • enqueue()

Enqueues the Message in the Yate engine
Return: True if enqueue succeeded, false on failure


  • dispatch()
  • dispatch(unblock)

Parameters:
unblock - Optional boolean flag to unblock context variables during dispatch
Return: True if message was handled, false if it was not handled


  • name()

Return: String name of the message


  • broadcast()

Return: Boolean broadcast flag


  • retValue()

Return: Returned value of the message


  • retValue(value)

Parameters:
value - New returned value to set in the message


  • msgTime()

Return: Message creation time in milliseconds since EPOCH


  • getColumn()


  • getRow()


  • getResult()
Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers