Package org.osgi.service.blueprint.reflect

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


    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();
        String compName = referenceMetadata.getComponentName();
        String blueprintFilter = referenceMetadata.getFilter();
        String id = referenceMetadata.getId();
        boolean isMultiple = (referenceMetadata instanceof ReferenceListMetadata);
       
        //The blueprint parser teams up with JPA and blueprint resource ref
        // namespace handlers to give us service imports of the form,
        // objectClass=javax.persistence.EntityManagerFactory, org.apache.aries.jpa.proxy.factory=*, osgi.unit.name=blabber
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>();
      for (ComponentMetadata compMetadata : findAllComponents(cdr)) {
        if (compMetadata instanceof ServiceReferenceMetadata) {
          ServiceReferenceMetadata referenceMetadata = (ServiceReferenceMetadata)compMetadata;

          boolean optional = referenceMetadata.getAvailability() == ServiceReferenceMetadata.AVAILABILITY_OPTIONAL;
          String iface = referenceMetadata.getInterface();
          String compName = referenceMetadata.getComponentName();
          String blueprintFilter = referenceMetadata.getFilter();
          String id = referenceMetadata.getId();
          boolean isMultiple = (referenceMetadata instanceof ReferenceListMetadata);
         
          //The blueprint parser teams up with JPA and blueprint resource ref
          // namespace handlers to give us service imports of the form,
          // objectClass=javax.persistence.EntityManagerFactory, org.apache.aries.jpa.proxy.factory=*, osgi.unit.name=blabber
View Full Code Here

                traverse(e.getKey(), output);
                traverse(e.getValue(), output);
            }
           
        } else if (component instanceof ServiceReferenceMetadata) {
            ServiceReferenceMetadata reference = (ServiceReferenceMetadata) component;
           
            for (ReferenceListener listener : reference.getReferenceListeners()) {
                traverse(listener.getListenerComponent(), output);
            }
        }
    }
View Full Code Here

TOP

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

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.