public class ComponentCommands
extends java.lang.Object
implements org.osgi.util.tracker.ServiceTrackerCustomizer<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>
Modifier and Type | Field and Description |
---|---|
private org.osgi.framework.ServiceRegistration<ComponentCommands> |
commandsReg |
private java.util.Comparator<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO> |
configDtoComparator |
private org.osgi.framework.BundleContext |
context |
private org.osgi.util.tracker.ServiceTracker<java.lang.Object,org.osgi.framework.ServiceRegistration<?>> |
gogoRuntimeTracker |
private static java.lang.String |
INDENT_1 |
private static java.lang.String |
INDENT_2 |
private org.osgi.service.component.runtime.ServiceComponentRuntime |
scr |
private ScrConfiguration |
scrConfig |
private org.osgi.framework.ServiceRegistration<ScrInfo> |
scrInfoReg |
private java.util.Comparator<org.osgi.framework.dto.ServiceReferenceDTO> |
serviceRefDtoComparator |
Modifier | Constructor and Description |
---|---|
protected |
ComponentCommands(org.osgi.framework.BundleContext context,
org.osgi.service.component.runtime.ServiceComponentRuntime scr,
ScrConfiguration scrConfig) |
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.ServiceRegistration<?> |
addingService(org.osgi.framework.ServiceReference<java.lang.Object> reference) |
private java.lang.String |
arrayToString(java.lang.String[] array) |
java.lang.String |
config() |
java.lang.Object |
convert(java.lang.Class<?> desiredType,
java.lang.Object in) |
private java.lang.Object |
createConverter(org.osgi.framework.Bundle bundle) |
boolean |
disable(java.lang.String name) |
boolean |
enable(java.lang.String name) |
private java.util.List<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> |
findComponents(java.lang.String name) |
(package private) java.lang.CharSequence |
format(org.osgi.service.component.runtime.dto.ComponentConfigurationDTO dto,
int level) |
(package private) java.lang.CharSequence |
format(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] dtoArray,
int level) |
(package private) java.lang.CharSequence |
format(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO dto,
int level) |
java.lang.CharSequence |
format(java.lang.Object target,
int level) |
private static java.lang.String[] |
getStringArray(java.util.Map<java.lang.String,?> map,
java.lang.String name,
java.lang.String[] defaultValue) |
org.osgi.service.component.runtime.dto.ComponentConfigurationDTO |
info(long id) |
org.osgi.service.component.runtime.dto.ComponentDescriptionDTO |
info(java.lang.String name) |
org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] |
list() |
org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] |
list(long bundleId) |
void |
modifiedService(org.osgi.framework.ServiceReference<java.lang.Object> reference,
org.osgi.framework.ServiceRegistration<?> reg) |
(package private) static void |
printColumnsAligned(java.lang.String title,
java.util.Map<java.lang.String,java.lang.String> properties,
char underlineChar,
java.lang.StringBuilder builder) |
(package private) void |
printComponentDescriptionAndConfigs(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO descDto,
org.osgi.service.component.runtime.dto.ComponentConfigurationDTO[] configs,
java.lang.StringBuilder builder) |
(package private) static java.lang.String |
printProperties(java.util.Map<java.lang.String,?> props,
java.lang.String indent) |
(package private) java.lang.String |
printPublishedServices(org.osgi.framework.ServiceReference<?>[] serviceRefs) |
(package private) void |
printServiceReference(org.osgi.service.component.runtime.dto.ReferenceDTO reference,
java.lang.String state,
org.osgi.framework.dto.ServiceReferenceDTO[] bindings,
java.lang.StringBuilder builder) |
(package private) java.lang.String |
printServiceReferences(org.osgi.service.component.runtime.dto.SatisfiedReferenceDTO[] satisfiedReferences,
org.osgi.service.component.runtime.dto.UnsatisfiedReferenceDTO[] unsatisfiedReferences,
org.osgi.service.component.runtime.dto.ReferenceDTO[] references) |
(package private) void |
register() |
void |
removedService(org.osgi.framework.ServiceReference<java.lang.Object> reference,
org.osgi.framework.ServiceRegistration<?> reg) |
private void |
safeUnregister(org.osgi.framework.ServiceRegistration<?> registration) |
(package private) static java.lang.String |
stateToString(int state) |
(package private) void |
unregister() |
void |
updateProvideScrInfoService(boolean register) |
private static final java.lang.String INDENT_1
private static final java.lang.String INDENT_2
private final org.osgi.framework.BundleContext context
private final org.osgi.service.component.runtime.ServiceComponentRuntime scr
private final ScrConfiguration scrConfig
private final org.osgi.util.tracker.ServiceTracker<java.lang.Object,org.osgi.framework.ServiceRegistration<?>> gogoRuntimeTracker
private final java.util.Comparator<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO> configDtoComparator
private final java.util.Comparator<org.osgi.framework.dto.ServiceReferenceDTO> serviceRefDtoComparator
private org.osgi.framework.ServiceRegistration<ComponentCommands> commandsReg
private org.osgi.framework.ServiceRegistration<ScrInfo> scrInfoReg
protected ComponentCommands(org.osgi.framework.BundleContext context, org.osgi.service.component.runtime.ServiceComponentRuntime scr, ScrConfiguration scrConfig)
void register()
void unregister()
public void updateProvideScrInfoService(boolean register)
public org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] list()
public org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] list(long bundleId)
private java.util.List<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> findComponents(java.lang.String name)
public org.osgi.service.component.runtime.dto.ComponentDescriptionDTO info(java.lang.String name)
public org.osgi.service.component.runtime.dto.ComponentConfigurationDTO info(long id)
public boolean enable(java.lang.String name)
public boolean disable(java.lang.String name)
public java.lang.String config()
public java.lang.Object convert(java.lang.Class<?> desiredType, java.lang.Object in) throws java.lang.Exception
java.lang.Exception
public java.lang.CharSequence format(java.lang.Object target, int level) throws java.lang.Exception
java.lang.Exception
java.lang.CharSequence format(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] dtoArray, int level) throws java.lang.Exception
java.lang.Exception
java.lang.CharSequence format(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO dto, int level) throws java.lang.Exception
java.lang.Exception
java.lang.CharSequence format(org.osgi.service.component.runtime.dto.ComponentConfigurationDTO dto, int level) throws java.lang.Exception
java.lang.Exception
void printComponentDescriptionAndConfigs(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO descDto, org.osgi.service.component.runtime.dto.ComponentConfigurationDTO[] configs, java.lang.StringBuilder builder)
java.lang.String printPublishedServices(org.osgi.framework.ServiceReference<?>[] serviceRefs)
private java.lang.String arrayToString(java.lang.String[] array)
static final java.lang.String stateToString(int state)
static java.lang.String printProperties(java.util.Map<java.lang.String,?> props, java.lang.String indent)
java.lang.String printServiceReferences(org.osgi.service.component.runtime.dto.SatisfiedReferenceDTO[] satisfiedReferences, org.osgi.service.component.runtime.dto.UnsatisfiedReferenceDTO[] unsatisfiedReferences, org.osgi.service.component.runtime.dto.ReferenceDTO[] references)
void printServiceReference(org.osgi.service.component.runtime.dto.ReferenceDTO reference, java.lang.String state, org.osgi.framework.dto.ServiceReferenceDTO[] bindings, java.lang.StringBuilder builder)
static void printColumnsAligned(java.lang.String title, java.util.Map<java.lang.String,java.lang.String> properties, char underlineChar, java.lang.StringBuilder builder)
private static java.lang.String[] getStringArray(java.util.Map<java.lang.String,?> map, java.lang.String name, java.lang.String[] defaultValue) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
private void safeUnregister(org.osgi.framework.ServiceRegistration<?> registration)
public org.osgi.framework.ServiceRegistration<?> addingService(org.osgi.framework.ServiceReference<java.lang.Object> reference)
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>
private java.lang.Object createConverter(org.osgi.framework.Bundle bundle)
public void modifiedService(org.osgi.framework.ServiceReference<java.lang.Object> reference, org.osgi.framework.ServiceRegistration<?> reg)
modifiedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>
public void removedService(org.osgi.framework.ServiceReference<java.lang.Object> reference, org.osgi.framework.ServiceRegistration<?> reg)
removedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>