Interface Root

All Superinterfaces:
Lookup.Provider
All Known Subinterfaces:
RootHub.ServiceProvider
All Known Implementing Classes:
AbstractRoot, AbstractRootContainer, BasicCoreRoot, CodeRoot, CodeRootContainer, DefaultScriptService

public interface Root extends Lookup.Provider
Root provides the companion part of the actor-model to Component within PraxisCORE's forest-of-actors model. The Root implementation handles initial message handling and scheduling. There may be many Roots within a running PraxisCORE system - the Roots are sandboxed from each other and the RootHub handles delivery of messages (Packet / Call) from one Root to another.

A Root may be a Component or Container, but this is not required. As Component implementations are intended to be lock-free and single-threaded, the Root implementation will ensure that all messages are handled serially. Some Root implementations will have a one-to-one relationship to a thread of execution.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    An interface used by the RootHub to control the lifecycle of, and communicate with, the Root.
  • Method Summary

    Modifier and Type
    Method
    Description
    Method used by the RootHub to initialize the Root and obtain a Controller.

    Methods inherited from interface org.praxislive.core.Lookup.Provider

    getLookup
  • Method Details

    • initialize

      Root.Controller initialize(String ID, RootHub hub)
      Method used by the RootHub to initialize the Root and obtain a Controller. Root implementations will ensure this method can only be invoked once.
      Parameters:
      ID - the unique ID of this Root
      hub - the RootHub the Root resides within
      Returns:
      Controller for use by the RootHub instance
      Throws:
      IllegalStateException - if the Root has already been initialized