caf_platform/platform_main

A top level supervisor component that assembles and manages the framework from simpler components.

Components are described in file framework.json.

Properties:

  {appPublisher: string, appLocalName: string, appSuffix: string,
   synchronousInit: boolean}

where:

  • appPublisher: the publisher of this app, e.g., root.
  • appLocaName: the name of this app local to its publisher, e.g., helloworld.
  • appSuffix: the URL suffix for the app, i.e., cafjs.com.
  • synchronousInit: true if lazy initialization is disabled, and the callback should return only after the system is fully functional.
Source:

Extends

Methods

__ca_getAppFullName__() → {string}

Source:

Returns the application fully qualified name, e.g., root-helloworld.cafjs.com

Returns:

A fully qualified name for this app.

Type
string

__ca_getAppName__() → {string}

Source:

Returns this application name, e.g., root-helloworld

Returns:

A name for this app.

Type
string

__ca_getAppSuffix__() → {string}

Source:

Returns the application domain suffix, e.g., cafjs.com

Returns:

A domain suffix for this app.

Type
string

__ca_graceful_shutdown__(dataopt, cb0)

Source:

A graceful shutdown that waits until a pending checkup has finished.

This is needed mostly for testing, where we want to cleanly start/stop the platform in the same process.

Otherwise, races between shutdown and checkup could bring back to life parts of the platform, affecting other tests.

In production it is easier to brute force shutdown and create a new one, since the state is always checkpointed.

Parameters:
Name Type Attributes Description
data Object <optional>

An optional hint for shutdown.

cb0 cbType

A callback to continue.