Focus chain

The Focus chain is the primary mechanism through which application components in the Spiralcraft Framework are bound to each other and to the "models" they touch.

The Focus chain implements a Contextual Singleton pattern. It can be queried for a given type URI, and will return the "closest" (to the requester) Channel in the chain that provides the specified type.

Framework systems and applications that wish to expose various object models through ELaine (spiralcraft.lang) Expressions do so by building a Focus chain, and publishing Channels which provide specific content.

The Focus chain is often constructed according to the containership hierarchy composed at the application level (eg. a WebUI page or a Builder (spiralcraft.builder) Assembly)

Through the use of Channel and ThreadLocalChannel implementations, the Contextual interface and the FocusChain, components at different layers of the call stack can resolve context provided by components at higher layers, without requiring the cooperation of intermediate objects.