Package org.osgi.service.blueprint.reflect

Examples of org.osgi.service.blueprint.reflect.ComponentMetadata


      boolean suppressAnonymousServices) {
    _logger.debug(LOG_ENTRY, "parseCDRForServices", new Object[]{cdr, suppressAnonymousServices});
    List<ExportedService> result = new ArrayList<ExportedService>();
    Set<String> names = cdr.getComponentDefinitionNames();
    for (String name: names) {
      ComponentMetadata compMetadata = cdr.getComponentDefinition(name);
      if (compMetadata instanceof ServiceMetadata) {
        ServiceMetadata serviceMetadata = (ServiceMetadata)compMetadata;
        String serviceName;
        int ranking;
        Collection<String> interfaces = new ArrayList<String>();
View Full Code Here


  private List<ImportedService> parseCDRForReferences (ComponentDefinitionRegistry cdr) throws InvalidAttributeException {
    _logger.debug(LOG_ENTRY, "parseCDRForReferences", new Object[]{cdr});
    List<ImportedService> result = new ArrayList<ImportedService>();
    Set<String> names = cdr.getComponentDefinitionNames();
    for (String name: names) {
      ComponentMetadata compMetadata = cdr.getComponentDefinition(name);
      if (compMetadata instanceof ServiceReferenceMetadata) {
        ServiceReferenceMetadata referenceMetadata = (ServiceReferenceMetadata)compMetadata;

        boolean optional = referenceMetadata.getAvailability() == ServiceReferenceMetadata.AVAILABILITY_OPTIONAL;
        String iface = referenceMetadata.getInterface();
View Full Code Here

    }

    private void initializeWildcardMap() {
        for (String s : container.getComponentIds()) {
            if (isWildcardBeanName(s)) {
                ComponentMetadata cmd = container.getComponentMetadata(s);
                Class<?> cls = BlueprintBeanLocator.getClassForMetaData(container, cmd);
                if (cls != null) {
                    String orig = s;
                    if (s.charAt(0) == '*') {
                        //old wildcard
View Full Code Here

        Method m = ReflectionUtil.findMethod(container.getClass(), "injectBeanInstance",
                                             BeanMetadata.class, Object.class);
        try {
            if (m != null) {
                //Aries blueprint 0.4.1+
                ComponentMetadata cm = null;
                try {
                    cm = container.getComponentMetadata(bn);
                } catch (NoSuchComponentException nsce) {
                    cm = null;
                }
View Full Code Here

    }

    private void initializeWildcardMap() {
        for (String s : container.getComponentIds()) {
            if (isWildcardBeanName(s)) {
                ComponentMetadata cmd = container.getComponentMetadata(s);
                Class<?> cls = BlueprintBeanLocator.getClassForMetaData(container, cmd);
                if (cls != null) {
                    String orig = s;
                    if (s.charAt(0) == '*') {
                        //old wildcard
View Full Code Here

        Method m = ReflectionUtil.findMethod(container.getClass(), "injectBeanInstance",
                                             BeanMetadata.class, Object.class);
        try {
            if (m != null) {
                //Aries blueprint 0.4.1+
                ComponentMetadata cm = null;
                try {
                    cm = container.getComponentMetadata(bn);
                } catch (NoSuchComponentException nsce) {
                    cm = null;
                }
View Full Code Here

    }

    private void initializeWildcardMap() {
        for (String s : container.getComponentIds()) {
            if (isWildcardBeanName(s)) {
                ComponentMetadata cmd = container.getComponentMetadata(s);
                Class<?> cls = BlueprintBeanLocator.getClassForMetaData(container, cmd);
                if (cls != null) {
                    String orig = s;
                    if (s.charAt(0) == '*') {
                        //old wildcard
View Full Code Here

        Method m = ReflectionUtil.findMethod(container.getClass(), "injectBeanInstance",
                                             BeanMetadata.class, Object.class);
        try {
            if (m != null) {
                //Aries blueprint 0.4.1+
                ComponentMetadata cm = null;
                try {
                    cm = container.getComponentMetadata(bn);
                } catch (NoSuchComponentException nsce) {
                    cm = null;
                }
View Full Code Here

        return v;
    }

    protected MutableBeanMetadata getBus(ParserContext context, String name) {
        ComponentDefinitionRegistry cdr = context.getComponentDefinitionRegistry();
        ComponentMetadata meta = cdr.getComponentDefinition("blueprintBundle");

        Bundle blueprintBundle = null;
        if (meta instanceof PassThroughMetadata) {
            blueprintBundle = (Bundle) ((PassThroughMetadata) meta).getObject();
        }
View Full Code Here

   
    public BlueprintRepository createRepository() {
        BlueprintRepository repository = new BlueprintRepository(blueprintContainer);
        // Create component recipes
        for (String name : registry.getComponentDefinitionNames()) {
            ComponentMetadata component = registry.getComponentDefinition(name);
            Recipe recipe = createRecipe(component);
            repository.putRecipe(recipe.getName(), recipe);
        }
        repository.validate();
        return repository;
View Full Code Here

TOP

Related Classes of org.osgi.service.blueprint.reflect.ComponentMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.