Examples of MapToDictionary


Examples of org.apache.felix.framework.util.MapToDictionary

     * @param locale
     * @return localized bundle headers dictionary.
    **/
    Dictionary getBundleHeaders(BundleImpl bundle, String locale)
    {
        return new MapToDictionary(bundle.getCurrentLocalizedHeader(locale));
    }
View Full Code Here

Examples of org.apache.felix.utils.collections.MapToDictionary

    {
        initialize();

        Filter filter = filterExpr != null ? m_helper.filter(filterExpr) : null;
        Resource[] resources;
        MapToDictionary dict = new MapToDictionary(null);
        Repository[] repos = listRepositories();
        List matchList = new ArrayList();
        for (int repoIdx = 0; (repos != null) && (repoIdx < repos.length); repoIdx++)
        {
            resources = repos[repoIdx].getResources();
            for (int resIdx = 0; (resources != null) && (resIdx < resources.length); resIdx++)
            {
                dict.setSourceMap(resources[resIdx].getProperties());
                if (filter == null || filter.match(dict))
                {
                    matchList.add(resources[resIdx]);
                }
            }
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.MapToDictionary

    public boolean match(InternalEndpoint source) {
        if (nmrEndpoint != null) {
            return source.getEndpoint() == nmrEndpoint;
        } else {
            return osgiFilter.match(new MapToDictionary(source.getMetaData()));
        }
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.MapToDictionary

            try {
                final org.osgi.framework.Filter flt = org.osgi.framework.FrameworkUtil.createFilter(filter);
                DynamicReferenceImpl ref = new DynamicReferenceImpl(this, new Filter<InternalEndpoint>() {
                    public boolean match(InternalEndpoint endpoint) {
                        Map<String, ?> props = EndpointRegistryImpl.this.getProperties(endpoint);
                        return flt.match(new MapToDictionary(props));
                    }
                });
                this.references.put(ref, true);
                return ref;
            } catch (org.osgi.framework.InvalidSyntaxException e) {
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.MapToDictionary

    @Override
    protected void doRegister(InternalEndpoint endpoint, Map<String, ?> properties) {
        ServiceRegistration reg = bundleContext.registerService(
                                      InternalEndpoint.class.getName(),
                                      endpoint,
                                      new MapToDictionary(properties));
        registrations.put(endpoint, reg);
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.MapToDictionary

        }
    }
   
    protected ServiceRegistration registerWire(Wire wire) {
        return bundle.getBundleContext().registerService(Wire.class.getName(),
                                                         wire, new MapToDictionary(wire.getFrom()));
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.MapToDictionary

    public void register(Endpoint endpoint, Map<String, ?> properties) {
        ServiceRegistration reg = bundleContext.registerService(
                                      Endpoint.class.getName(),
                                      endpoint,
                                      new MapToDictionary(properties));
        registrations.put(endpoint, reg);
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.MapToDictionary

                        // should not happen as this has been checked in the constructor
                    }
                }
            }
        }
        return osgiFilter.match(new MapToDictionary(epProps));
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.MapToDictionary

    public void register(Endpoint endpoint, Map<String, ?> properties) {
        ServiceRegistration reg = bundleContext.registerService(
                                      Endpoint.class.getName(),
                                      endpoint,
                                      new MapToDictionary(properties));
        registrations.put(endpoint, reg);
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.MapToDictionary

            try {
                final org.osgi.framework.Filter flt = org.osgi.framework.FrameworkUtil.createFilter(filter);
                DynamicReferenceImpl ref = new DynamicReferenceImpl(this, new Filter<InternalEndpoint>() {
                    public boolean match(InternalEndpoint endpoint) {
                        Map<String, ?> props = EndpointRegistryImpl.this.getProperties(endpoint);
                        return flt.match(new MapToDictionary(props));
                    }
                });
                this.references.put(ref, true);
                return ref;
            } catch (org.osgi.framework.InvalidSyntaxException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.