Interface Root

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

    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.
    • Method Detail

      • 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