Class ComponentCommands

java.lang.Object
org.apache.felix.scr.impl.ComponentCommands
All Implemented Interfaces:
org.osgi.util.tracker.ServiceTrackerCustomizer<Object,org.osgi.framework.ServiceRegistration<?>>

public class ComponentCommands extends Object implements org.osgi.util.tracker.ServiceTrackerCustomizer<Object,org.osgi.framework.ServiceRegistration<?>>
  • Field Details

    • INDENT_1

      private static final String INDENT_1
      See Also:
    • INDENT_2

      private static final String INDENT_2
      See Also:
    • 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<Object,org.osgi.framework.ServiceRegistration<?>> gogoRuntimeTracker
    • configDtoComparator

      private final Comparator<org.osgi.service.component.runtime.dto.ComponentConfigurationDTO> configDtoComparator
    • serviceRefDtoComparator

      private final Comparator<org.osgi.framework.dto.ServiceReferenceDTO> serviceRefDtoComparator
    • commandsReg

      private org.osgi.framework.ServiceRegistration<ComponentCommands> commandsReg
    • scrInfoReg

      private org.osgi.framework.ServiceRegistration<ScrInfo> 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

      private List<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> findComponents(String name)
    • info

      public org.osgi.service.component.runtime.dto.ComponentDescriptionDTO info(String name)
    • info

      public org.osgi.service.component.runtime.dto.ComponentConfigurationDTO info(long id)
    • enable

      public boolean enable(String name)
    • disable

      public boolean disable(String name)
    • config

      public String config()
    • convert

      public Object convert(Class<?> desiredType, Object in) throws Exception
      Throws:
      Exception
    • format

      public CharSequence format(Object target, int level) throws Exception
      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

      String printPublishedServices(org.osgi.framework.ServiceReference<?>[] serviceRefs)
    • arrayToString

      private String arrayToString(String[] array)
    • stateToString

      static final String stateToString(int state)
    • printProperties

      static String printProperties(Map<String,?> props, String indent)
    • 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 interface org.osgi.util.tracker.ServiceTrackerCustomizer<Object,org.osgi.framework.ServiceRegistration<?>>
    • createConverter

      private Object createConverter(org.osgi.framework.Bundle bundle)
    • modifiedService

      public void modifiedService(org.osgi.framework.ServiceReference<Object> reference, org.osgi.framework.ServiceRegistration<?> reg)
      Specified by:
      modifiedService in interface org.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 interface org.osgi.util.tracker.ServiceTrackerCustomizer<Object,org.osgi.framework.ServiceRegistration<?>>