Class ScrConfigurationImpl

java.lang.Object
org.apache.felix.scr.impl.config.ScrConfigurationImpl
All Implemented Interfaces:
ScrConfiguration

public class ScrConfigurationImpl extends Object implements ScrConfiguration
The ScrConfiguration class conveys configuration for the Felix DS implementation bundle.

Configuration Source

  1. Framework properties: These are read when the Declarative Services implementation is first started.
  2. Configuration Admin Service: Properties are provided by means of a ManagedService with Service PID org.apache.felix.scr.ScrService. This class uses an OSGi Service Factory (ScrManagedServiceServiceFactory) to register the managed service without requiring the Configuration Admin Service API to be required upfront.

See the Configuration section of the Apache Felix Service Component Runtime documentation page for detailed information.

  • Field Details

    • VALUE_TRUE

      private static final String VALUE_TRUE
    • LOG_LEVEL_DEBUG

      private static final String LOG_LEVEL_DEBUG
      See Also:
    • LOG_LEVEL_INFO

      private static final String LOG_LEVEL_INFO
      See Also:
    • LOG_LEVEL_WARN

      private static final String LOG_LEVEL_WARN
      See Also:
    • LOG_LEVEL_ERROR

      private static final String LOG_LEVEL_ERROR
      See Also:
    • PROP_SHOWTRACE

      private static final String PROP_SHOWTRACE
      See Also:
    • PROP_SHOWERRORS

      private static final String PROP_SHOWERRORS
      See Also:
    • activator

      private final Activator activator
    • logLevel

      private int logLevel
    • factoryEnabled

      private boolean factoryEnabled
    • keepInstances

      private boolean keepInstances
    • infoAsService

      private boolean infoAsService
    • lockTimeout

      private long lockTimeout
    • stopTimeout

      private long stopTimeout
    • serviceChangecountTimeout

      private long serviceChangecountTimeout
    • globalExtender

      private Boolean globalExtender
    • bundleContext

      private volatile org.osgi.framework.BundleContext bundleContext
    • managedServiceRef

      private volatile org.osgi.framework.ServiceRegistration<?> managedServiceRef
    • metatypeProviderRef

      private volatile org.osgi.framework.ServiceRegistration<?> metatypeProviderRef
    • scrCommand

      private ComponentCommands scrCommand
  • Constructor Details

    • ScrConfigurationImpl

      public ScrConfigurationImpl(Activator activator)
  • Method Details

    • start

      public void start(org.osgi.framework.BundleContext bundleContext)
    • stop

      public void stop()
    • setScrCommand

      public void setScrCommand(ComponentCommands scrCommand)
    • configure

      void configure(Dictionary<String,?> config, boolean fromConfig)
    • getLogLevel

      public int getLogLevel()
      Returns the current log level. Note that this log level is not used with an R7 LogService implementation.
      Specified by:
      getLogLevel in interface ScrConfiguration
      Returns:
    • isFactoryEnabled

      public boolean isFactoryEnabled()
      Specified by:
      isFactoryEnabled in interface ScrConfiguration
    • keepInstances

      public boolean keepInstances()
      Specified by:
      keepInstances in interface ScrConfiguration
    • infoAsService

      public boolean infoAsService()
      Specified by:
      infoAsService in interface ScrConfiguration
    • lockTimeout

      public long lockTimeout()
      Specified by:
      lockTimeout in interface ScrConfiguration
    • stopTimeout

      public long stopTimeout()
      Specified by:
      stopTimeout in interface ScrConfiguration
    • globalExtender

      public boolean globalExtender()
      Specified by:
      globalExtender in interface ScrConfiguration
    • serviceChangecountTimeout

      public long serviceChangecountTimeout()
      Specified by:
      serviceChangecountTimeout in interface ScrConfiguration
    • getDefaultFactoryEnabled

      private boolean getDefaultFactoryEnabled()
    • getDefaultKeepInstances

      private boolean getDefaultKeepInstances()
    • getDefaultLogLevel

      private int getDefaultLogLevel()
    • getDefaultInfoAsService

      private boolean getDefaultInfoAsService()
    • getDefaultLockTimeout

      private long getDefaultLockTimeout()
    • getDefaultStopTimeout

      private long getDefaultStopTimeout()
    • getServiceChangecountTimeout

      private long getServiceChangecountTimeout()
    • getDefaultGlobalExtender

      private boolean getDefaultGlobalExtender()
    • getLogLevel

      private int getLogLevel(Object levelObject)