Package org.apache.felix.scr.impl
Class ComponentCommands
java.lang.Object
org.apache.felix.scr.impl.ComponentCommands
- All Implemented Interfaces:
org.osgi.util.tracker.ServiceTrackerCustomizer<Object,
org.osgi.framework.ServiceRegistration<?>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.osgi.framework.ServiceRegistration
<ComponentCommands> private final Comparator
<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO> private final org.osgi.framework.BundleContext
private final org.osgi.util.tracker.ServiceTracker
<Object, org.osgi.framework.ServiceRegistration<?>> private static final String
private static final String
private final org.osgi.service.component.runtime.ServiceComponentRuntime
private final ScrConfiguration
private org.osgi.framework.ServiceRegistration
<ScrInfo> private final Comparator
<org.osgi.framework.dto.ServiceReferenceDTO> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ComponentCommands
(org.osgi.framework.BundleContext context, org.osgi.service.component.runtime.ServiceComponentRuntime scr, ScrConfiguration scrConfig) -
Method Summary
Modifier and TypeMethodDescriptionorg.osgi.framework.ServiceRegistration
<?> addingService
(org.osgi.framework.ServiceReference<Object> reference) private String
arrayToString
(String[] array) config()
private Object
createConverter
(org.osgi.framework.Bundle bundle) boolean
boolean
private List
<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> findComponents
(String name) (package private) CharSequence
format
(org.osgi.service.component.runtime.dto.ComponentConfigurationDTO dto, int level) (package private) CharSequence
format
(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] dtoArray, int level) (package private) CharSequence
format
(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO dto, int level) private static String[]
getStringArray
(Map<String, ?> map, String name, String[] defaultValue) org.osgi.service.component.runtime.dto.ComponentConfigurationDTO
info
(long id) org.osgi.service.component.runtime.dto.ComponentDescriptionDTO
org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[]
list()
org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[]
list
(long bundleId) void
modifiedService
(org.osgi.framework.ServiceReference<Object> reference, org.osgi.framework.ServiceRegistration<?> reg) (package private) static void
printColumnsAligned
(String title, Map<String, String> properties, char underlineChar, StringBuilder builder) (package private) void
printComponentDescriptionAndConfigs
(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO descDto, org.osgi.service.component.runtime.dto.ComponentConfigurationDTO[] configs, StringBuilder builder) (package private) static String
printProperties
(Map<String, ?> props, String indent) (package private) String
printPublishedServices
(org.osgi.framework.ServiceReference<?>[] serviceRefs) (package private) void
printServiceReference
(org.osgi.service.component.runtime.dto.ReferenceDTO reference, String state, org.osgi.framework.dto.ServiceReferenceDTO[] bindings, StringBuilder builder) (package private) 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<Object> reference, org.osgi.framework.ServiceRegistration<?> reg) private void
safeUnregister
(org.osgi.framework.ServiceRegistration<?> registration) (package private) static final String
stateToString
(int state) (package private) void
void
updateProvideScrInfoService
(boolean register)
-
Field Details
-
INDENT_1
- See Also:
-
INDENT_2
- See Also:
-
context
private final org.osgi.framework.BundleContext context -
scr
private final org.osgi.service.component.runtime.ServiceComponentRuntime scr -
scrConfig
-
gogoRuntimeTracker
private final org.osgi.util.tracker.ServiceTracker<Object,org.osgi.framework.ServiceRegistration<?>> gogoRuntimeTracker -
configDtoComparator
private final Comparator<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO> configDtoComparator -
serviceRefDtoComparator
-
commandsReg
-
scrInfoReg
-
-
Constructor Details
-
ComponentCommands
protected ComponentCommands(org.osgi.framework.BundleContext context, org.osgi.service.component.runtime.ServiceComponentRuntime scr, ScrConfiguration scrConfig)
-
-
Method Details
-
register
void register() -
unregister
void unregister() -
updateProvideScrInfoService
public void updateProvideScrInfoService(boolean register) -
list
public org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] list() -
list
public org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] list(long bundleId) -
findComponents
-
info
-
info
public org.osgi.service.component.runtime.dto.ComponentConfigurationDTO info(long id) -
enable
-
disable
-
config
-
convert
- Throws:
Exception
-
format
- Throws:
Exception
-
format
CharSequence format(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] dtoArray, int level) throws Exception - Throws:
Exception
-
format
CharSequence format(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO dto, int level) throws Exception - Throws:
Exception
-
format
CharSequence format(org.osgi.service.component.runtime.dto.ComponentConfigurationDTO dto, int level) throws Exception - Throws:
Exception
-
printComponentDescriptionAndConfigs
void printComponentDescriptionAndConfigs(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO descDto, org.osgi.service.component.runtime.dto.ComponentConfigurationDTO[] configs, StringBuilder builder) -
printPublishedServices
-
arrayToString
-
stateToString
-
printProperties
-
printServiceReferences
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) -
printServiceReference
void printServiceReference(org.osgi.service.component.runtime.dto.ReferenceDTO reference, String state, org.osgi.framework.dto.ServiceReferenceDTO[] bindings, StringBuilder builder) -
printColumnsAligned
static void printColumnsAligned(String title, Map<String, String> properties, char underlineChar, StringBuilder builder) -
getStringArray
private static String[] getStringArray(Map<String, ?> map, String name, String[] defaultValue) throws IllegalArgumentException- Throws:
IllegalArgumentException
-
safeUnregister
private void safeUnregister(org.osgi.framework.ServiceRegistration<?> registration) -
addingService
public org.osgi.framework.ServiceRegistration<?> addingService(org.osgi.framework.ServiceReference<Object> reference) - Specified by:
addingService
in interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<Object,
org.osgi.framework.ServiceRegistration<?>>
-
createConverter
-
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference<Object> reference, org.osgi.framework.ServiceRegistration<?> reg) - Specified by:
modifiedService
in interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<Object,
org.osgi.framework.ServiceRegistration<?>>
-
removedService
public void removedService(org.osgi.framework.ServiceReference<Object> reference, org.osgi.framework.ServiceRegistration<?> reg) - Specified by:
removedService
in interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<Object,
org.osgi.framework.ServiceRegistration<?>>
-