Search in sources :

Example 6 with RegistrationListener

use of org.osgi.service.blueprint.reflect.RegistrationListener in project aries by apache.

the class RecipeBuilder method createServiceRecipe.

private Recipe createServiceRecipe(ServiceMetadata serviceExport) {
    CollectionRecipe listenersRecipe = new CollectionRecipe(getName(null), ArrayList.class, Object.class.getName());
    if (serviceExport.getRegistrationListeners() != null) {
        for (RegistrationListener listener : serviceExport.getRegistrationListeners()) {
            listenersRecipe.add(createRecipe(listener));
        }
    }
    ServiceRecipe recipe = new ServiceRecipe(getName(serviceExport.getId()), blueprintContainer, serviceExport, getValue(serviceExport.getServiceComponent(), null), listenersRecipe, getServicePropertiesRecipe(serviceExport), getDependencies(serviceExport));
    return recipe;
}
Also used : RegistrationListener(org.osgi.service.blueprint.reflect.RegistrationListener) CollectionRecipe(org.apache.aries.blueprint.di.CollectionRecipe)

Aggregations

RegistrationListener (org.osgi.service.blueprint.reflect.RegistrationListener)6 MapEntry (org.osgi.service.blueprint.reflect.MapEntry)3 ArrayList (java.util.ArrayList)2 BeanArgument (org.osgi.service.blueprint.reflect.BeanArgument)2 BeanMetadata (org.osgi.service.blueprint.reflect.BeanMetadata)2 BeanProperty (org.osgi.service.blueprint.reflect.BeanProperty)2 MapMetadata (org.osgi.service.blueprint.reflect.MapMetadata)2 ReferenceListener (org.osgi.service.blueprint.reflect.ReferenceListener)2 ServiceMetadata (org.osgi.service.blueprint.reflect.ServiceMetadata)2 ServiceReferenceMetadata (org.osgi.service.blueprint.reflect.ServiceReferenceMetadata)2 WrappedServiceMetadata (org.apache.aries.application.modelling.WrappedServiceMetadata)1 ExtendedBeanMetadata (org.apache.aries.blueprint.ExtendedBeanMetadata)1 CollectionRecipe (org.apache.aries.blueprint.di.CollectionRecipe)1 MutableBeanMetadata (org.apache.aries.blueprint.mutable.MutableBeanMetadata)1 MutableCollectionMetadata (org.apache.aries.blueprint.mutable.MutableCollectionMetadata)1 MutableMapEntry (org.apache.aries.blueprint.mutable.MutableMapEntry)1 MutableMapMetadata (org.apache.aries.blueprint.mutable.MutableMapMetadata)1 MutableRegistrationListener (org.apache.aries.blueprint.mutable.MutableRegistrationListener)1 MutableServiceMetadata (org.apache.aries.blueprint.mutable.MutableServiceMetadata)1 ComponentDefinitionException (org.osgi.service.blueprint.container.ComponentDefinitionException)1