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<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>
public class ComponentCommands extends java.lang.Object implements org.osgi.util.tracker.ServiceTrackerCustomizer<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>
-
-
Field Summary
Fields Modifier and Type Field Description private org.osgi.framework.ServiceRegistration<ComponentCommands>commandsRegprivate java.util.Comparator<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO>configDtoComparatorprivate org.osgi.framework.BundleContextcontextprivate org.osgi.util.tracker.ServiceTracker<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>gogoRuntimeTrackerprivate static java.lang.StringINDENT_1private static java.lang.StringINDENT_2private org.osgi.service.component.runtime.ServiceComponentRuntimescrprivate ScrConfigurationscrConfigprivate org.osgi.framework.ServiceRegistration<ScrInfo>scrInfoRegprivate java.util.Comparator<org.osgi.framework.dto.ServiceReferenceDTO>serviceRefDtoComparator
-
Constructor Summary
Constructors Modifier Constructor Description protectedComponentCommands(org.osgi.framework.BundleContext context, org.osgi.service.component.runtime.ServiceComponentRuntime scr, ScrConfiguration scrConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.osgi.framework.ServiceRegistration<?>addingService(org.osgi.framework.ServiceReference<java.lang.Object> reference)private java.lang.StringarrayToString(java.lang.String[] array)java.lang.Stringconfig()java.lang.Objectconvert(java.lang.Class<?> desiredType, java.lang.Object in)private java.lang.ObjectcreateConverter(org.osgi.framework.Bundle bundle)booleandisable(java.lang.String name)booleanenable(java.lang.String name)private java.util.List<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO>findComponents(java.lang.String name)java.lang.CharSequenceformat(java.lang.Object target, int level)(package private) java.lang.CharSequenceformat(org.osgi.service.component.runtime.dto.ComponentConfigurationDTO dto, int level)(package private) java.lang.CharSequenceformat(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] dtoArray, int level)(package private) java.lang.CharSequenceformat(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO dto, 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.ComponentConfigurationDTOinfo(long id)org.osgi.service.component.runtime.dto.ComponentDescriptionDTOinfo(java.lang.String name)org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[]list()org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[]list(long bundleId)voidmodifiedService(org.osgi.framework.ServiceReference<java.lang.Object> reference, org.osgi.framework.ServiceRegistration<?> reg)(package private) static voidprintColumnsAligned(java.lang.String title, java.util.Map<java.lang.String,java.lang.String> properties, char underlineChar, java.lang.StringBuilder builder)(package private) voidprintComponentDescriptionAndConfigs(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.StringprintProperties(java.util.Map<java.lang.String,?> props, java.lang.String indent)(package private) java.lang.StringprintPublishedServices(org.osgi.framework.ServiceReference<?>[] serviceRefs)(package private) voidprintServiceReference(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.StringprintServiceReferences(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) voidregister()voidremovedService(org.osgi.framework.ServiceReference<java.lang.Object> reference, org.osgi.framework.ServiceRegistration<?> reg)private voidsafeUnregister(org.osgi.framework.ServiceRegistration<?> registration)(package private) static java.lang.StringstateToString(int state)(package private) voidunregister()voidupdateProvideScrInfoService(boolean register)
-
-
-
Field Detail
-
INDENT_1
private static final java.lang.String INDENT_1
- See Also:
- Constant Field Values
-
INDENT_2
private static final java.lang.String INDENT_2
- See Also:
- Constant Field Values
-
context
private final org.osgi.framework.BundleContext context
-
scr
private final org.osgi.service.component.runtime.ServiceComponentRuntime scr
-
scrConfig
private final ScrConfiguration scrConfig
-
gogoRuntimeTracker
private final org.osgi.util.tracker.ServiceTracker<java.lang.Object,org.osgi.framework.ServiceRegistration<?>> gogoRuntimeTracker
-
configDtoComparator
private final java.util.Comparator<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO> configDtoComparator
-
serviceRefDtoComparator
private final java.util.Comparator<org.osgi.framework.dto.ServiceReferenceDTO> serviceRefDtoComparator
-
commandsReg
private org.osgi.framework.ServiceRegistration<ComponentCommands> commandsReg
-
scrInfoReg
private org.osgi.framework.ServiceRegistration<ScrInfo> scrInfoReg
-
-
Constructor Detail
-
ComponentCommands
protected ComponentCommands(org.osgi.framework.BundleContext context, org.osgi.service.component.runtime.ServiceComponentRuntime scr, ScrConfiguration scrConfig)
-
-
Method Detail
-
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
private java.util.List<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> findComponents(java.lang.String name)
-
info
public org.osgi.service.component.runtime.dto.ComponentDescriptionDTO info(java.lang.String name)
-
info
public org.osgi.service.component.runtime.dto.ComponentConfigurationDTO info(long id)
-
enable
public boolean enable(java.lang.String name)
-
disable
public boolean disable(java.lang.String name)
-
config
public java.lang.String config()
-
convert
public java.lang.Object convert(java.lang.Class<?> desiredType, java.lang.Object in) throws java.lang.Exception- Throws:
java.lang.Exception
-
format
public java.lang.CharSequence format(java.lang.Object target, int level) throws java.lang.Exception- Throws:
java.lang.Exception
-
format
java.lang.CharSequence format(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO[] dtoArray, int level) throws java.lang.Exception- Throws:
java.lang.Exception
-
format
java.lang.CharSequence format(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO dto, int level) throws java.lang.Exception- Throws:
java.lang.Exception
-
format
java.lang.CharSequence format(org.osgi.service.component.runtime.dto.ComponentConfigurationDTO dto, int level) throws java.lang.Exception- Throws:
java.lang.Exception
-
printComponentDescriptionAndConfigs
void printComponentDescriptionAndConfigs(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO descDto, org.osgi.service.component.runtime.dto.ComponentConfigurationDTO[] configs, java.lang.StringBuilder builder)
-
printPublishedServices
java.lang.String printPublishedServices(org.osgi.framework.ServiceReference<?>[] serviceRefs)
-
arrayToString
private java.lang.String arrayToString(java.lang.String[] array)
-
stateToString
static final java.lang.String stateToString(int state)
-
printProperties
static java.lang.String printProperties(java.util.Map<java.lang.String,?> props, java.lang.String indent)
-
printServiceReferences
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)
-
printServiceReference
void printServiceReference(org.osgi.service.component.runtime.dto.ReferenceDTO reference, java.lang.String state, org.osgi.framework.dto.ServiceReferenceDTO[] bindings, java.lang.StringBuilder builder)
-
printColumnsAligned
static void printColumnsAligned(java.lang.String title, java.util.Map<java.lang.String,java.lang.String> properties, char underlineChar, java.lang.StringBuilder builder)
-
getStringArray
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- Throws:
java.lang.IllegalArgumentException
-
safeUnregister
private void safeUnregister(org.osgi.framework.ServiceRegistration<?> registration)
-
addingService
public org.osgi.framework.ServiceRegistration<?> addingService(org.osgi.framework.ServiceReference<java.lang.Object> reference)
- Specified by:
addingServicein interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>
-
createConverter
private java.lang.Object createConverter(org.osgi.framework.Bundle bundle)
-
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference<java.lang.Object> reference, org.osgi.framework.ServiceRegistration<?> reg)- Specified by:
modifiedServicein interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>
-
removedService
public void removedService(org.osgi.framework.ServiceReference<java.lang.Object> reference, org.osgi.framework.ServiceRegistration<?> reg)- Specified by:
removedServicein interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<java.lang.Object,org.osgi.framework.ServiceRegistration<?>>
-
-