public class ScrCommand extends java.lang.Object implements ScrInfo
ScrCommand
class provides the implementations for the
Apache Felix Gogo and legacy Apache Felix Shell commands. The
#register(BundleContext, ScrService, ScrConfiguration)
method
instantiates and registers the Gogo and Shell commands as possible.Modifier and Type | Class and Description |
---|---|
private static class |
ScrCommand.Result |
Modifier and Type | Field and Description |
---|---|
private org.osgi.framework.BundleContext |
bundleContext |
private static java.util.Comparator<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO> |
CONFIGURATION_COMP |
private static java.util.Comparator<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> |
DESCRIPTION_COMP |
private org.osgi.framework.ServiceRegistration<?> |
gogoReg |
private org.osgi.framework.ServiceRegistration<ScrInfo> |
reg |
private ScrConfigurationImpl |
scrConfiguration |
private org.osgi.service.component.runtime.ServiceComponentRuntime |
scrService |
private org.osgi.framework.ServiceRegistration<?> |
shellReg |
Modifier | Constructor and Description |
---|---|
protected |
ScrCommand(org.osgi.framework.BundleContext bundleContext,
org.osgi.service.component.runtime.ServiceComponentRuntime scrService,
ScrConfigurationImpl scrConfiguration) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
change(java.lang.String componentIdentifier,
java.io.PrintWriter out,
boolean enable) |
void |
config(java.io.PrintWriter out)
List in text the current SCR configuration
|
private ScrCommand.Result |
getComponentsFromArg(java.lang.String componentIdentifier,
boolean nameMatch) |
private void |
info(org.osgi.service.component.runtime.dto.ComponentConfigurationDTO cc,
java.io.PrintWriter out) |
void |
info(java.lang.String componentId,
java.io.PrintWriter out)
List in text detailed information about the specified components.
|
void |
list(java.lang.String bundleIdentifier,
java.io.PrintWriter out)
List in text the components for the bundle specified, or all components if null, sorted by component ID
|
(package private) void |
propertyInfo(java.util.Map<java.lang.String,java.lang.Object> props,
java.io.PrintWriter out,
java.lang.String prefix,
java.lang.String label) |
(package private) static ScrCommand |
register(org.osgi.framework.BundleContext bundleContext,
org.osgi.service.component.runtime.ServiceComponentRuntime scrService,
ScrConfigurationImpl scrConfiguration) |
private void |
registerCommands(org.osgi.framework.BundleContext bundleContext,
org.osgi.service.component.runtime.ServiceComponentRuntime scrService) |
private java.lang.String |
toStateString(int state) |
(package private) void |
unregister() |
void |
update(boolean infoAsService) |
private static final java.util.Comparator<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> DESCRIPTION_COMP
private static final java.util.Comparator<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO> CONFIGURATION_COMP
private final org.osgi.framework.BundleContext bundleContext
private final org.osgi.service.component.runtime.ServiceComponentRuntime scrService
private final ScrConfigurationImpl scrConfiguration
private org.osgi.framework.ServiceRegistration<ScrInfo> reg
private org.osgi.framework.ServiceRegistration<?> gogoReg
private org.osgi.framework.ServiceRegistration<?> shellReg
protected ScrCommand(org.osgi.framework.BundleContext bundleContext, org.osgi.service.component.runtime.ServiceComponentRuntime scrService, ScrConfigurationImpl scrConfiguration)
static ScrCommand register(org.osgi.framework.BundleContext bundleContext, org.osgi.service.component.runtime.ServiceComponentRuntime scrService, ScrConfigurationImpl scrConfiguration)
private void registerCommands(org.osgi.framework.BundleContext bundleContext, org.osgi.service.component.runtime.ServiceComponentRuntime scrService)
void unregister()
public void update(boolean infoAsService)
public void list(java.lang.String bundleIdentifier, java.io.PrintWriter out)
ScrInfo
public void info(java.lang.String componentId, java.io.PrintWriter out)
ScrInfo
void propertyInfo(java.util.Map<java.lang.String,java.lang.Object> props, java.io.PrintWriter out, java.lang.String prefix, java.lang.String label)
private void info(org.osgi.service.component.runtime.dto.ComponentConfigurationDTO cc, java.io.PrintWriter out)
void change(java.lang.String componentIdentifier, java.io.PrintWriter out, boolean enable)
public void config(java.io.PrintWriter out)
ScrInfo
private java.lang.String toStateString(int state)
private ScrCommand.Result getComponentsFromArg(java.lang.String componentIdentifier, boolean nameMatch)