Interface CoreService


  • public interface CoreService
    Service for interacting with the core system of the controller.
    • Field Detail

      • CORE_PROVIDER_ID

        static final ProviderId CORE_PROVIDER_ID
        Identifier of the core "provider".
    • Method Detail

      • version

        Version version()
        Returns the product version.
        Returns:
        product version
      • getAppIds

        Set<ApplicationId> getAppIds()
        Returns the set of currently registered application identifiers.
        Returns:
        set of application ids
      • getAppId

        ApplicationId getAppId​(Short id)
        Returns an existing application id from a given id.
        Parameters:
        id - the short value of the id
        Returns:
        an application id
      • getAppId

        ApplicationId getAppId​(String name)
        Returns an existing application id from a given id.
        Parameters:
        name - the name portion of the ID to look up
        Returns:
        an application id
      • registerApplication

        ApplicationId registerApplication​(String name)
        Registers a new application by its name, which is expected to follow the reverse DNS convention, e.g. org.flying.circus.app
        Parameters:
        name - string identifier
        Returns:
        the application id
      • registerApplication

        ApplicationId registerApplication​(String name,
                                          Runnable preDeactivate)
        Registers a new application by its name, which is expected to follow the reverse DNS convention, e.g. org.flying.circus.app, along with its pre-deactivation hook.
        Parameters:
        name - string identifier
        preDeactivate - pre-deactivation hook
        Returns:
        the application id
      • getIdGenerator

        IdGenerator getIdGenerator​(String topic)
        Returns an id generator for a given topic.
        Parameters:
        topic - topic identified
        Returns:
        the id generator