Package org.apache.felix.scr.impl.config
Class ScrConfigurationImpl
java.lang.Object
org.apache.felix.scr.impl.config.ScrConfigurationImpl
- All Implemented Interfaces:
LogConfiguration
,ScrConfiguration
The
ScrConfiguration
class conveys configuration for the
Felix DS implementation bundle.
Configuration Source
- Framework properties: These are read when the Declarative Services implementation is first started.
- Configuration Admin Service: Properties are provided by means of a
ManagedService
with Service PIDorg.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 Summary
FieldsModifier and TypeFieldDescriptionprivate final Activator
private org.osgi.framework.BundleContext
private boolean
private boolean
private Boolean
private boolean
private boolean
private boolean
private boolean
private long
private static final String
private static final String
private static final String
private static final String
private InternalLogger.Level
private org.osgi.framework.ServiceRegistration
<?> private org.osgi.framework.ServiceRegistration
<?> private static final String
private static final String
private ComponentCommands
private long
private long
private static final String
Fields inherited from interface org.apache.felix.scr.impl.logger.LogConfiguration
PROP_LOG_ENABLED, PROP_LOG_EXTENSION, PROP_LOGLEVEL
Fields inherited from interface org.apache.felix.scr.impl.manager.ScrConfiguration
DEFAULT_LOCK_TIMEOUT_MILLISECONDS, DEFAULT_SERVICE_CHANGECOUNT_TIMEOUT_MILLISECONDS, DEFAULT_STOP_TIMEOUT_MILLISECONDS, PID, PROP_CACHE_METADATA, PROP_DELAYED_KEEP_INSTANCES, PROP_FACTORY_ENABLED, PROP_GLOBAL_EXTENDER, PROP_INFO_SERVICE, PROP_LOCK_TIMEOUT, PROP_SERVICE_CHANGECOUNT_TIMEOUT, PROP_STOP_TIMEOUT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
private boolean
checkIfLogEnabled
(Dictionary<String, ?> properties) (package private) void
configure
(Dictionary<String, ?> config, boolean fromConfig) private boolean
private boolean
private boolean
private boolean
private boolean
private long
private boolean
private boolean
private InternalLogger.Level
private long
Returns the current log level.private InternalLogger.Level
getLogLevel
(Object levelObject) private long
boolean
boolean
boolean
boolean
Checks if the logging is enabled.boolean
Checks if the log extension is enabled.boolean
long
long
void
setScrCommand
(ComponentCommands scrCommand) void
start
(org.osgi.framework.BundleContext bundleContext) void
stop()
long
-
Field Details
-
VALUE_TRUE
-
LOG_LEVEL_DEBUG
- See Also:
-
LOG_LEVEL_INFO
- See Also:
-
LOG_LEVEL_WARN
- See Also:
-
LOG_LEVEL_ERROR
- See Also:
-
PROP_SHOWTRACE
- See Also:
-
PROP_SHOWERRORS
- See Also:
-
activator
-
logLevel
-
factoryEnabled
private boolean factoryEnabled -
keepInstances
private boolean keepInstances -
infoAsService
private boolean infoAsService -
cacheMetadata
private boolean cacheMetadata -
isLogEnabled
private boolean isLogEnabled -
isLogExtensionEnabled
private boolean isLogExtensionEnabled -
lockTimeout
private long lockTimeout -
stopTimeout
private long stopTimeout -
serviceChangecountTimeout
private long serviceChangecountTimeout -
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
-
-
Constructor Details
-
ScrConfigurationImpl
-
-
Method Details
-
start
public void start(org.osgi.framework.BundleContext bundleContext) -
stop
public void stop() -
setScrCommand
-
configure
-
getLogLevel
Returns the current log level. Note that this log level is not used with an R7 LogService implementation.- Specified by:
getLogLevel
in interfaceLogConfiguration
- Returns:
-
isFactoryEnabled
public boolean isFactoryEnabled()- Specified by:
isFactoryEnabled
in interfaceScrConfiguration
-
keepInstances
public boolean keepInstances()- Specified by:
keepInstances
in interfaceScrConfiguration
-
infoAsService
public boolean infoAsService()- Specified by:
infoAsService
in interfaceScrConfiguration
-
lockTimeout
public long lockTimeout()- Specified by:
lockTimeout
in interfaceScrConfiguration
-
stopTimeout
public long stopTimeout()- Specified by:
stopTimeout
in interfaceScrConfiguration
-
globalExtender
public boolean globalExtender()- Specified by:
globalExtender
in interfaceScrConfiguration
-
cacheMetadata
public boolean cacheMetadata()- Specified by:
cacheMetadata
in interfaceScrConfiguration
-
serviceChangecountTimeout
public long serviceChangecountTimeout()- Specified by:
serviceChangecountTimeout
in interfaceScrConfiguration
-
getDefaultFactoryEnabled
private boolean getDefaultFactoryEnabled() -
getDefaultKeepInstances
private boolean getDefaultKeepInstances() -
getDefaultLogLevel
-
getDefaultInfoAsService
private boolean getDefaultInfoAsService() -
getDefaultLockTimeout
private long getDefaultLockTimeout() -
getDefaultStopTimeout
private long getDefaultStopTimeout() -
getServiceChangecountTimeout
private long getServiceChangecountTimeout() -
getDefaultGlobalExtender
private boolean getDefaultGlobalExtender() -
getDefaultCacheMetadata
private boolean getDefaultCacheMetadata() -
getLogLevel
-
isLogEnabled
public boolean isLogEnabled()Description copied from interface:LogConfiguration
Checks if the logging is enabled. Disabling logging is incompatible with the OSGi specification.- Specified by:
isLogEnabled
in interfaceLogConfiguration
- Returns:
true
if enabled otherwisefalse
-
isLogExtensionEnabled
public boolean isLogExtensionEnabled()Description copied from interface:LogConfiguration
Checks if the log extension is enabled. The extension is incompatible with the OSGi specification.- Specified by:
isLogExtensionEnabled
in interfaceLogConfiguration
- Returns:
true
if enabled otherwisefalse
-
getDefaultLogExtension
private boolean getDefaultLogExtension() -
getDefaultLogEnabled
private boolean getDefaultLogEnabled() -
checkIfLogEnabled
-