Class AppManagerImpl

    • Constructor Detail

      • AppManagerImpl

        public AppManagerImpl()
    • Method Detail

      • getInstantiatedApps

        public final java.util.List<OpenemsAppInstance> getInstantiatedApps()
        Gets an unmodifiable list of the current instantiated apps.
        Returns:
        the list of instantiated apps
      • configurationEvent

        public void configurationEvent​(org.osgi.service.cm.ConfigurationEvent event)
        Specified by:
        configurationEvent in interface org.osgi.service.cm.ConfigurationListener
      • excludingInstanceIds

        public static java.util.function.Predicate<? super OpenemsAppInstance> excludingInstanceIds​(java.util.UUID... excludingInstanceIds)
        Gets a filter for excluding instances.
        Parameters:
        excludingInstanceIds - the instances that should be excluded
        Returns:
        the filter
      • appConfigs

        public java.lang.Iterable<java.util.Map.Entry<OpenemsAppInstance,​AppConfiguration>> appConfigs()
        Gets an Iterable that loops thru every existing app instance and its configuration.
        Returns:
        the Iterable
      • appConfigs

        public java.lang.Iterable<java.util.Map.Entry<OpenemsAppInstance,​AppConfiguration>> appConfigs​(java.util.function.Predicate<? super OpenemsAppInstance> filter)
        Gets an Iterable that loops thru every existing app instance and its configuration.
        Parameters:
        filter - the filter that gets applied to the instances
        Returns:
        the Iterable
      • appConfigs

        public java.lang.Iterable<java.util.Map.Entry<OpenemsAppInstance,​AppConfiguration>> appConfigs​(java.util.List<OpenemsAppInstance> instances,
                                                                                                             java.util.function.Predicate<? super OpenemsAppInstance> filter)
        Gets an Iterable that loops thru every instance and its configuration.
        Parameters:
        instances - the instances
        filter - the filter that gets applied to the instances
        Returns:
        the Iterable
      • debugLog

        public java.lang.String debugLog()
        Description copied from interface: OpenemsComponent
        Gets some output that is suitable for a continuous Debug log. Returns 'null' by default which causes no output.
        Specified by:
        debugLog in interface OpenemsComponent
        Returns:
        the debug log output
      • findAppById

        protected final OpenemsApp findAppById​(java.lang.String id)
                                        throws java.util.NoSuchElementException
        finds the app with the matching id.
        Parameters:
        id - of the app
        Returns:
        the found app
        Throws:
        java.util.NoSuchElementException
      • findInstanceById

        protected final OpenemsAppInstance findInstanceById​(java.util.UUID uuid)
                                                     throws java.util.NoSuchElementException
        Finds the app instance with the matching id.
        Parameters:
        uuid - the id of the instance
        Returns:
        s the instance
        Throws:
        java.util.NoSuchElementException - if no instance is present