Search in sources :

Example 1 with ServiceTuple

use of org.apache.aries.jax.rs.whiteboard.internal.utils.ServiceTuple in project aries-jax-rs-whiteboard by apache.

the class Whiteboard method createBus.

private ExtensionManagerBus createBus(Map<String, ServiceTuple<Object>> extensions) {
    BundleWiring wiring = _bundleContext.getBundle().adapt(BundleWiring.class);
    Map<String, Object> properties = new HashMap<>(_configurationMap);
    properties.putIfAbsent("replace.loopback.address.with.localhost", "false");
    HashMap<Class<?>, Object> cxfExtensions = new HashMap<>();
    if (extensions.isEmpty()) {
        cxfExtensions = null;
    } else {
        for (Map.Entry<String, ServiceTuple<Object>> entry : extensions.entrySet()) {
            String className = entry.getKey();
            ServiceTuple<Object> serviceTuple = entry.getValue();
            ClassLoader classLoader = getClassLoader(serviceTuple);
            try {
                Class<?> clazz = classLoader.loadClass(className);
                cxfExtensions.put(clazz, serviceTuple.getService());
            } catch (Exception e) {
                if (_log.isErrorEnabled()) {
                    _log.error("Could not load extension for CXF bus", e);
                }
            }
        }
    }
    if (_log.isDebugEnabled()) {
        _log.debug("Creating CXF Bus with extensions {} and properties {}", extensions, properties);
    }
    ExtensionManagerBus bus = new ExtensionManagerBus(cxfExtensions, properties, wiring.getClassLoader());
    bus.initialize();
    if (_log.isDebugEnabled()) {
        _log.debug("Created CXF Bus with extensions {} and properties {}", extensions, properties);
    }
    return bus;
}
Also used : BundleWiring(org.osgi.framework.wiring.BundleWiring) Utils.getString(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.getString) ServiceTuple(org.apache.aries.jax.rs.whiteboard.internal.utils.ServiceTuple) Collectors.toMap(java.util.stream.Collectors.toMap) Utils.accumulateInMap(org.apache.aries.component.dsl.Utils.accumulateInMap) ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus)

Example 2 with ServiceTuple

use of org.apache.aries.jax.rs.whiteboard.internal.utils.ServiceTuple in project aries-jax-rs-whiteboard by apache.

the class Whiteboard method getResourceProvider.

private static <T> OSGi<? extends ResourceProvider> getResourceProvider(ServiceTuple<T> serviceTuple) {
    CachingServiceReference<T> cachingServiceReference = serviceTuple.getCachingServiceReference();
    String scope = Utils.getString(cachingServiceReference.getProperty("service.scope"));
    if (Objects.equals(scope, "prototype")) {
        boolean applicationScoped = Boolean.parseBoolean(getString(cachingServiceReference.getProperty("org.apache.aries.jax.rs.whiteboard.application.scoped")));
        if (applicationScoped) {
            return just(serviceTuple.getServiceObjects().getService()).effects(__ -> {
            }, serviceTuple.getServiceObjects()::ungetService).map(service -> new SingletonServiceReferenceResourceProvider(cachingServiceReference, service));
        } else {
            return just(new PrototypeServiceReferenceResourceProvider(cachingServiceReference, serviceTuple.getService().getClass(), serviceTuple.getServiceObjects())).effects(__ -> {
            }, __ -> serviceTuple.dispose(), __ -> {
            }, __ -> {
            });
        }
    } else {
        return just(new SingletonServiceReferenceResourceProvider(serviceTuple.getCachingServiceReference(), serviceTuple.getService()));
    }
}
Also used : OSGi.serviceReferences(org.apache.aries.component.dsl.OSGi.serviceReferences) HTTP_WHITEBOARD_SERVLET_PATTERN(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN) ServletContextHelper(org.osgi.service.http.context.ServletContextHelper) Utils.getApplicationProperties(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.getApplicationProperties) ResourceProvider(org.apache.cxf.jaxrs.lifecycle.ResourceProvider) OSGi.effects(org.apache.aries.component.dsl.OSGi.effects) JAX_RS_RESOURCE(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_RESOURCE) JAX_RS_EXTENSION(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_EXTENSION) LoggerFactory(org.slf4j.LoggerFactory) ExceptionMapper(javax.ws.rs.ext.ExceptionMapper) MessageBodyWriter(javax.ws.rs.ext.MessageBodyWriter) Application(javax.ws.rs.core.Application) ContainerRequestFilter(javax.ws.rs.container.ContainerRequestFilter) ContainerResponseFilter(javax.ws.rs.container.ContainerResponseFilter) CxfJaxrsServiceRegistrator(org.apache.aries.jax.rs.whiteboard.internal.cxf.CxfJaxrsServiceRegistrator) JAX_RS_WHITEBOARD_TARGET(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_WHITEBOARD_TARGET) ContextResolver(javax.ws.rs.ext.ContextResolver) CachingServiceReference(org.apache.aries.component.dsl.CachingServiceReference) Collectors.toMap(java.util.stream.Collectors.toMap) OSGiResult(org.apache.aries.component.dsl.OSGiResult) ReaderInterceptor(javax.ws.rs.ext.ReaderInterceptor) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) JAX_RS_DEFAULT_APPLICATION(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_DEFAULT_APPLICATION) OSGi.just(org.apache.aries.component.dsl.OSGi.just) HTTP_WHITEBOARD_CONTEXT_SELECT(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT) ParamConverterProvider(javax.ws.rs.ext.ParamConverterProvider) JaxrsServiceRuntime(org.osgi.service.jaxrs.runtime.JaxrsServiceRuntime) HTTP_WHITEBOARD_CONTEXT_PATH(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH) HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_ASYNC_SUPPORTED) HTTP_WHITEBOARD_SERVLET_NAME(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME) LogUtils.ifErrorEnabled(org.apache.aries.jax.rs.whiteboard.internal.utils.LogUtils.ifErrorEnabled) Utils.onlyGettables(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.onlyGettables) LogUtils.ifDebugEnabled(org.apache.aries.jax.rs.whiteboard.internal.utils.LogUtils.ifDebugEnabled) OSGi.register(org.apache.aries.component.dsl.OSGi.register) Utils.highest(org.apache.aries.component.dsl.Utils.highest) Servlet(javax.servlet.Servlet) SingletonServiceReferenceResourceProvider(org.apache.aries.jax.rs.whiteboard.internal.cxf.SingletonServiceReferenceResourceProvider) JAX_RS_APPLICATION_BASE(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_APPLICATION_BASE) HTTP_WHITEBOARD_DEFAULT_CONTEXT_NAME(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_DEFAULT_CONTEXT_NAME) OSGi.changeContext(org.apache.aries.component.dsl.OSGi.changeContext) OSGi(org.apache.aries.component.dsl.OSGi) OSGi.once(org.apache.aries.component.dsl.OSGi.once) String.format(java.lang.String.format) Utils.getString(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.getString) OSGi.all(org.apache.aries.component.dsl.OSGi.all) org.osgi.framework(org.osgi.framework) Utils.canonicalizeAddress(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.canonicalizeAddress) DynamicFeature(javax.ws.rs.container.DynamicFeature) Stream(java.util.stream.Stream) HTTP_WHITEBOARD_TARGET(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_TARGET) JAX_RS_SERVICE_ENDPOINT(org.osgi.service.jaxrs.runtime.JaxrsServiceRuntimeConstants.JAX_RS_SERVICE_ENDPOINT) ServiceTuple(org.apache.aries.jax.rs.whiteboard.internal.utils.ServiceTuple) OSGi.nothing(org.apache.aries.component.dsl.OSGi.nothing) SERVICE_PID(org.osgi.framework.Constants.SERVICE_PID) Utils(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils) Bus(org.apache.cxf.Bus) Feature(javax.ws.rs.core.Feature) java.util(java.util) Utils.highestPer(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.highestPer) JAX_RS_APPLICATION_SELECT(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_APPLICATION_SELECT) AriesJaxrsServiceRuntime.getServiceName(org.apache.aries.jax.rs.whiteboard.internal.AriesJaxrsServiceRuntime.getServiceName) Function(java.util.function.Function) Supplier(java.util.function.Supplier) Utils.mergePropertyMaps(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.mergePropertyMaps) Utils.updateProperty(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.updateProperty) PropertyHolder(org.apache.aries.jax.rs.whiteboard.internal.utils.PropertyHolder) ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus) CXFNonSpringServlet(org.apache.cxf.transport.servlet.CXFNonSpringServlet) WriterInterceptor(javax.ws.rs.ext.WriterInterceptor) BundleWiring(org.osgi.framework.wiring.BundleWiring) PrototypeServiceReferenceResourceProvider(org.apache.aries.jax.rs.whiteboard.internal.cxf.PrototypeServiceReferenceResourceProvider) Logger(org.slf4j.Logger) Consumer(java.util.function.Consumer) HTTP_WHITEBOARD_CONTEXT_NAME(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME) AtomicLong(java.util.concurrent.atomic.AtomicLong) JAX_RS_EXTENSION_SELECT(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_EXTENSION_SELECT) Utils.canonicalize(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.canonicalize) JAX_RS_NAME(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_NAME) NOOP(org.apache.aries.component.dsl.OSGi.NOOP) Utils.accumulateInMap(org.apache.aries.component.dsl.Utils.accumulateInMap) MessageBodyReader(javax.ws.rs.ext.MessageBodyReader) OSGi.ignore(org.apache.aries.component.dsl.OSGi.ignore) SingletonServiceReferenceResourceProvider(org.apache.aries.jax.rs.whiteboard.internal.cxf.SingletonServiceReferenceResourceProvider) JAX_RS_WHITEBOARD_TARGET(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_WHITEBOARD_TARGET) HTTP_WHITEBOARD_CONTEXT_SELECT(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT) HTTP_WHITEBOARD_TARGET(org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_TARGET) JAX_RS_SERVICE_ENDPOINT(org.osgi.service.jaxrs.runtime.JaxrsServiceRuntimeConstants.JAX_RS_SERVICE_ENDPOINT) JAX_RS_APPLICATION_SELECT(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_APPLICATION_SELECT) JAX_RS_EXTENSION_SELECT(org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants.JAX_RS_EXTENSION_SELECT) PrototypeServiceReferenceResourceProvider(org.apache.aries.jax.rs.whiteboard.internal.cxf.PrototypeServiceReferenceResourceProvider) Utils.getString(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.getString)

Example 3 with ServiceTuple

use of org.apache.aries.jax.rs.whiteboard.internal.utils.ServiceTuple in project aries-jax-rs-whiteboard by apache.

the class CxfJaxrsServiceRegistrator method doRewire.

private synchronized void doRewire(Collection<ServiceTuple<?>> providers, Collection<ResourceProvider> services) {
    if (!_enabled) {
        return;
    }
    if (!_applicationTuple.isAvailable()) {
        _applicationTuple.dispose();
        return;
    }
    if (_server != null) {
        _server.destroy();
        _applicationTuple.refresh();
        for (ServiceTuple<?> provider : providers) {
            provider.refresh();
        }
    }
    Application application = _applicationTuple.getService();
    if (application == null) {
        return;
    }
    if (_services.isEmpty() && application.getSingletons().isEmpty() && application.getClasses().isEmpty()) {
        return;
    }
    _jaxRsServerFactoryBean = createEndpoint(application, JAXRSServerFactoryBean.class);
    _jaxRsServerFactoryBean.setInvoker(new PromiseAwareJAXRSInvoker());
    _jaxRsServerFactoryBean.setBus(_bus);
    _bus.setExtension(context -> {
        ConfigurableImpl<FeatureContext> configurable = new ConfigurableImpl<>(context, RuntimeType.SERVER);
        configurable.property("osgi.jaxrs.application.serviceProperties", _properties);
        return configurable;
    }, ServerConfigurableFactory.class);
    _jaxRsServerFactoryBean.setStart(false);
    List<org.apache.cxf.feature.Feature> features = new ArrayList<>();
    for (ServiceTuple<?> provider : providers) {
        CachingServiceReference<?> cachingServiceReference = provider.getCachingServiceReference();
        if (!provider.isAvailable()) {
            continue;
        }
        Object service = provider.getService();
        if (service == null) {
            continue;
        }
        if (service instanceof Feature || service instanceof DynamicFeature) {
            _jaxRsServerFactoryBean.setProvider(service);
            continue;
        } else if (service instanceof org.apache.cxf.feature.Feature) {
            features.add((org.apache.cxf.feature.Feature) service);
            continue;
        }
        Class<?> realClass = ClassHelper.getRealClass(getBus(), service);
        Class<?>[] interfaces = Arrays.stream(canonicalize(cachingServiceReference.getProperty("objectClass"))).filter(SUPPORTED_EXTENSION_INTERFACES::containsKey).map(SUPPORTED_EXTENSION_INTERFACES::get).toArray(Class[]::new);
        Map<Class<?>, Integer> classesWithPriorities = Arrays.stream(interfaces).collect(toMap(c -> c, __ -> AnnotationUtils.getBindingPriority(realClass)));
        _jaxRsServerFactoryBean.setProvider(new ServiceReferenceFilterProviderInfo<>(cachingServiceReference, realClass, realClass, service, getBus(), getFilterNameBindings(getBus(), service), false, classesWithPriorities));
    }
    _jaxRsServerFactoryBean.setProvider(new SseEventSinkContextProvider());
    _jaxRsServerFactoryBean.setProvider(new SseContextProvider());
    _jaxRsServerFactoryBean.setProvider(new ContextProvider<ApplicationClasses>() {

        @Override
        public ApplicationClasses createContext(Message message) {
            return () -> {
                return Stream.concat(StreamSupport.stream(getStaticResourceClasses().spliterator(), false), _services.stream().map(ResourceProvider::getResourceClass)).collect(toSet());
            };
        }
    });
    if (!features.isEmpty()) {
        features.addAll(_jaxRsServerFactoryBean.getFeatures());
        _jaxRsServerFactoryBean.setFeatures(features);
    }
    for (ResourceProvider resourceProvider : services) {
        if (resourceProvider instanceof PrototypeServiceReferenceResourceProvider) {
            PrototypeServiceReferenceResourceProvider provider = (PrototypeServiceReferenceResourceProvider) resourceProvider;
            if (!provider.isAvailable()) {
                continue;
            }
        }
        _jaxRsServerFactoryBean.setResourceProvider(resourceProvider);
    }
    if (_jaxRsServerFactoryBean.getResourceClasses().isEmpty()) {
        return;
    }
    ComparableResourceComparator comparableResourceComparator = new ComparableResourceComparator();
    _jaxRsServerFactoryBean.setResourceComparator(comparableResourceComparator);
    ProviderInfoClassComparator providerInfoClassComparator = new ProviderInfoClassComparator(Object.class);
    _jaxRsServerFactoryBean.setProviderComparator(new ServiceReferenceProviderInfoComparator(providerInfoClassComparator));
    _server = _jaxRsServerFactoryBean.create();
    Endpoint endpoint = _server.getEndpoint();
    ApplicationInfo applicationInfo = (ApplicationInfo) endpoint.get(Application.class.getName());
    applicationInfo.setOverridingProps(new HashMap<String, Object>() {

        {
            put("osgi.jaxrs.application.serviceProperties", _properties);
        }
    });
    endpoint.put("org.apache.cxf.jaxrs.resource.context.provider", createResourceContextProvider(_jaxRsServerFactoryBean.getServiceFactory()));
    _server.start();
}
Also used : PerRequestResourceProvider(org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider) Arrays(java.util.Arrays) ResourceProvider(org.apache.cxf.jaxrs.lifecycle.ResourceProvider) Provider(javax.ws.rs.ext.Provider) ClassHelper(org.apache.cxf.common.util.ClassHelper) ServiceReferenceRegistry(org.apache.aries.jax.rs.whiteboard.internal.ServiceReferenceRegistry) Application(javax.ws.rs.core.Application) SseContextProvider(org.apache.cxf.jaxrs.sse.SseContextProvider) CachingServiceReference(org.apache.aries.component.dsl.CachingServiceReference) Collectors.toMap(java.util.stream.Collectors.toMap) Map(java.util.Map) ResourceUtils(org.apache.cxf.jaxrs.utils.ResourceUtils) Collectors.toSet(java.util.stream.Collectors.toSet) Server(org.apache.cxf.endpoint.Server) RuntimeType(javax.ws.rs.RuntimeType) Collection(java.util.Collection) Set(java.util.Set) AnnotationUtils(org.apache.cxf.jaxrs.utils.AnnotationUtils) OSGi(org.apache.aries.component.dsl.OSGi) Collectors(java.util.stream.Collectors) DynamicFeature(javax.ws.rs.container.DynamicFeature) List(java.util.List) Stream(java.util.stream.Stream) ServiceTuple(org.apache.aries.jax.rs.whiteboard.internal.utils.ServiceTuple) Modifier(java.lang.reflect.Modifier) ClassResourceInfo(org.apache.cxf.jaxrs.model.ClassResourceInfo) Proxies(org.apache.aries.jax.rs.whiteboard.internal.introspection.Proxies) JAXRSServiceFactoryBean(org.apache.cxf.jaxrs.JAXRSServiceFactoryBean) ApplicationInfo(org.apache.cxf.jaxrs.model.ApplicationInfo) Bus(org.apache.cxf.Bus) SingletonResourceProvider(org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider) Feature(javax.ws.rs.core.Feature) SUPPORTED_EXTENSION_INTERFACES(org.apache.aries.jax.rs.whiteboard.internal.Whiteboard.SUPPORTED_EXTENSION_INTERFACES) DEFAULT_FILTER_NAME_BINDING(org.apache.cxf.jaxrs.provider.ProviderFactory.DEFAULT_FILTER_NAME_BINDING) HashMap(java.util.HashMap) TreeSet(java.util.TreeSet) ProviderInfoClassComparator(org.apache.cxf.jaxrs.provider.ProviderFactory.ProviderInfoClassComparator) ArrayList(java.util.ArrayList) ResourceContextProvider(org.apache.cxf.jaxrs.ext.ResourceContextProvider) FeatureContext(javax.ws.rs.core.FeatureContext) ServerConfigurableFactory(org.apache.cxf.jaxrs.provider.ServerConfigurableFactory) ContextProvider(org.apache.cxf.jaxrs.ext.ContextProvider) StreamSupport(java.util.stream.StreamSupport) AriesJaxrsServiceRuntime(org.apache.aries.jax.rs.whiteboard.internal.AriesJaxrsServiceRuntime) ConfigurableImpl(org.apache.cxf.jaxrs.impl.ConfigurableImpl) JAXRSServerFactoryBean(org.apache.cxf.jaxrs.JAXRSServerFactoryBean) Message(org.apache.cxf.message.Message) ApplicationClasses(org.apache.aries.jax.rs.whiteboard.ApplicationClasses) Utils.canonicalize(org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.canonicalize) Endpoint(org.apache.cxf.endpoint.Endpoint) SseEventSinkContextProvider(org.apache.cxf.jaxrs.sse.SseEventSinkContextProvider) Comparator(java.util.Comparator) Collections(java.util.Collections) Message(org.apache.cxf.message.Message) ArrayList(java.util.ArrayList) ApplicationInfo(org.apache.cxf.jaxrs.model.ApplicationInfo) DynamicFeature(javax.ws.rs.container.DynamicFeature) Feature(javax.ws.rs.core.Feature) DynamicFeature(javax.ws.rs.container.DynamicFeature) ProviderInfoClassComparator(org.apache.cxf.jaxrs.provider.ProviderFactory.ProviderInfoClassComparator) SUPPORTED_EXTENSION_INTERFACES(org.apache.aries.jax.rs.whiteboard.internal.Whiteboard.SUPPORTED_EXTENSION_INTERFACES) Endpoint(org.apache.cxf.endpoint.Endpoint) PerRequestResourceProvider(org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider) ResourceProvider(org.apache.cxf.jaxrs.lifecycle.ResourceProvider) SingletonResourceProvider(org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider) SseEventSinkContextProvider(org.apache.cxf.jaxrs.sse.SseEventSinkContextProvider) ApplicationClasses(org.apache.aries.jax.rs.whiteboard.ApplicationClasses) JAXRSServerFactoryBean(org.apache.cxf.jaxrs.JAXRSServerFactoryBean) SseContextProvider(org.apache.cxf.jaxrs.sse.SseContextProvider) FeatureContext(javax.ws.rs.core.FeatureContext) ConfigurableImpl(org.apache.cxf.jaxrs.impl.ConfigurableImpl) Application(javax.ws.rs.core.Application)

Aggregations

Collectors.toMap (java.util.stream.Collectors.toMap)3 ServiceTuple (org.apache.aries.jax.rs.whiteboard.internal.utils.ServiceTuple)3 Stream (java.util.stream.Stream)2 DynamicFeature (javax.ws.rs.container.DynamicFeature)2 Application (javax.ws.rs.core.Application)2 Feature (javax.ws.rs.core.Feature)2 CachingServiceReference (org.apache.aries.component.dsl.CachingServiceReference)2 OSGi (org.apache.aries.component.dsl.OSGi)2 Utils.accumulateInMap (org.apache.aries.component.dsl.Utils.accumulateInMap)2 Utils.getString (org.apache.aries.jax.rs.whiteboard.internal.utils.Utils.getString)2 ExtensionManagerBus (org.apache.cxf.bus.extension.ExtensionManagerBus)2 BundleWiring (org.osgi.framework.wiring.BundleWiring)2 String.format (java.lang.String.format)1 Modifier (java.lang.reflect.Modifier)1 java.util (java.util)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Comparator (java.util.Comparator)1