Methods
init(modulesopt, specopt, frameworkFileNameopt, cbopt)
Main initialization function for the framework.
This is typically the last call in your ca_methods.js
file.
It recursively loads and instantiates all the components described
in framework.json
. When all of them are active, it starts
listening for requests at an specified port.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
modules |
NodeJS.Module | Array.<NodeJS.Module> |
<optional> |
An optional sequence of modules (or just one) to load descriptions and implementations. |
spec |
specDeltaType |
<optional> |
Extra configuration data that will be merged
with the framework components description. For example, to override the
default name of the top component using |
frameworkFileName |
string |
<optional> |
An optional file name containing a
description of the framework components. It defaults to |
cb |
cbType |
<optional> |
An optional callback that will return an error
or the context |
joinName(…strings) → {string}
Joins partial names using the standard separator.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
strings |
string |
<repeatable> |
A var number of strings. |
Returns:
A joined name with the standard separator.
- Type
- string
splitName(name, separatoropt) → {Array.<string>}
Splits a compound name into namespace root and local name. The convention is to use the character '-' to separate them.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | A name to split. |
|
separator |
string |
<optional> |
Optional separator to override '-'. |
Throws:
-
Invalid compound name.
- Type
- Error
Returns:
An array with two elements: namespace root and
local name, or three if it also has a map name, or four if fully
qualified CA name ,i.e., appPublisher-appLocalName-caOwner-caLocalName
.
- Type
- Array.<string>