Class RunModeUtil


  • @Deprecated
    public class RunModeUtil
    extends java.lang.Object
    Deprecated.
    RunMode utilities. Instead of directly using the run mode service, it is better to make the component in question require a configuration (see OSGI Declarative Services Spec: configuration policy). In this case, a component gets only active if a configuration is available. Such a configuration can be put into the repository for the specific run mode.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String RUN_MODES_PROPERTY
      Deprecated.
      Name to use for the property that configures the run modes of a component
    • Constructor Summary

      Constructors 
      Constructor Description
      RunModeUtil()
      Deprecated.
       
    • Field Detail

      • RUN_MODES_PROPERTY

        public static final java.lang.String RUN_MODES_PROPERTY
        Deprecated.
        Name to use for the property that configures the run modes of a component
        See Also:
        Constant Field Values
    • Constructor Detail

      • RunModeUtil

        public RunModeUtil()
        Deprecated.
    • Method Detail

      • disableIfNoRunModeActive

        public static boolean disableIfNoRunModeActive​(RunMode rm,
                                                       java.lang.String[] componentRunModes,
                                                       ComponentContext ctx,
                                                       Logger log)
        Deprecated.
        Use this to disable a component if none of its run modes are active
        Parameters:
        rm - RunMode
        componentRunModes - component run modes
        ctx - component context
        log - logger
        Returns:
        true if component was disabled