public class BackendSupport extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
category(org.osgi.framework.Bundle bundle)
LogService doesn't know the concept of logger name (or category), so
we have to derive it from what we have - a bundle |
static String |
convertLogServiceLevel(int level)
Returns level name for given integer value that should match one of constants from
LogService. |
static int |
convertLogServiceLevel(String levelName)
Returns one of the log level constants from
LogService based on level name (case insensitive). |
static RegisteredService<org.osgi.service.log.LogReaderService,LogReaderServiceImpl> |
createAndRegisterLogReaderService(org.osgi.framework.BundleContext context)
Registers
LogReaderService and makes it available for actual
PaxLoggingService implementation |
static String |
defaultLogLevel(org.osgi.framework.BundleContext bundleContext)
Gets the default level name as configured for pax-logging.
|
static RegisteredService<ConfigurationNotifier,ConfigurationNotifier> |
eventAdminConfigurationNotifier(org.osgi.framework.BundleContext context)
Prepares (without registration)
ConfigurationNotifier regardles of availability of
Event Admin service |
static RegisteredService<EventAdminPoster,EventAdminPoster> |
eventAdminSupport(org.osgi.framework.BundleContext context)
Prepares (without registration)
EventAdminPoster regardles of availability of
Event Admin service |
static String |
externalFile(org.osgi.framework.BundleContext bundleContext,
String defaultFile) |
static boolean |
isConfigurationAdminAvailable() |
static int |
paxLoggingServiceRanking(org.osgi.framework.BundleContext context)
Returns configured service ranking for pax-logging services.
|
static Level |
toJULLevel(String levelName)
Converts pax-logging level name (anything that pax-logging supports, case-insensitive) to
Level
from java.util.logging. |
public static int paxLoggingServiceRanking(org.osgi.framework.BundleContext context)
public static RegisteredService<org.osgi.service.log.LogReaderService,LogReaderServiceImpl> createAndRegisterLogReaderService(org.osgi.framework.BundleContext context)
LogReaderService and makes it available for actual
PaxLoggingService implementationcontext - public static RegisteredService<EventAdminPoster,EventAdminPoster> eventAdminSupport(org.osgi.framework.BundleContext context)
EventAdminPoster regardles of availability of
Event Admin servicepublic static RegisteredService<ConfigurationNotifier,ConfigurationNotifier> eventAdminConfigurationNotifier(org.osgi.framework.BundleContext context)
ConfigurationNotifier regardles of availability of
Event Admin servicepublic static String defaultLogLevel(org.osgi.framework.BundleContext bundleContext)
DEBUG value).bundleContext - public static int convertLogServiceLevel(String levelName)
LogService based on level name (case insensitive).
If level is not recognized, DEBUG is assumed.levelName - LogService.LOG_ERROR, LogService.LOG_WARNING, LogService.LOG_INFO,
LogService.LOG_DEBUG or ZERO (meaning off).public static String convertLogServiceLevel(int level)
LogService. For
zero, OFF value is returned.level - public static Level toJULLevel(String levelName)
Level
from java.util.logging. If nothing can be parsed, Level.INFO is returned.levelName - public static String category(org.osgi.framework.Bundle bundle)
LogService doesn't know the concept of logger name (or category), so
we have to derive it from what we have - a bundlebundle - public static boolean isConfigurationAdminAvailable()
Copyright © 2006–2022 OPS4J - Open Participation Software for Java. All rights reserved.