Class: System

System

System represents a collection of related Concerns that share a parent Context. Use them to create to represent the root of a tree your application will branch into.

Constructor

new System(parent)

Parameters:
Name Type Description
parent Context
Implements:
Source:

Methods

(static) create(name) → {System}

create a new System

Parameters:
Name Type Description
name string
Source:
Returns:
Type
System

concernOf(factory, name) → {Reference}

concernOf considers a Concern part of this system when it activates.

Parameters:
Name Type Description
factory System.ConcernFactory
name string
Implements:
Source:
Returns:
Type
Reference

publish(event)

publish an event. Events are distinguished by the 'name' of their constructor properties.

Parameters:
Name Type Description
event object
Implements:
Source:

select(path)

select a Concern based on it's path

Parameters:
Name Type Description
path string
Implements:
Source:

setEventBus(bus)

setEventBus allows the EventEmitter to be set.

Parameters:
Name Type Description
bus events.EventEmitter
Source:

setReferenceProvider(protocol, provider)

setReferenceProvider allows a provider to be configured for a protocol.

Parameters:
Name Type Description
protocol string
provider ReferenceProvider
Source:

subscribe(event, handler)

subscribe adds a listener for an event

Parameters:
Name Type Description
event object
handler function
Implements:
Source: