Package org.apache.felix.connect.felix.framework.capabilityset

Examples of org.apache.felix.connect.felix.framework.capabilityset.SimpleFilter


    public synchronized List getServiceReferences(String className, SimpleFilter filter)
    {
        if ((className == null) && (filter == null))
        {
            // Return all services.
            filter = new SimpleFilter(Constants.OBJECTCLASS, "*", SimpleFilter.PRESENT);
        }
        else if ((className != null) && (filter == null))
        {
            // Return services matching the class name.
            filter = new SimpleFilter(Constants.OBJECTCLASS, className, SimpleFilter.EQ);
        }
        else if ((className != null) && (filter != null))
        {
            // Return services matching the class name and filter.
            List filters = new ArrayList(2);
            filters.add(new SimpleFilter(Constants.OBJECTCLASS, className, SimpleFilter.EQ));
            filters.add(filter);
            filter = new SimpleFilter(null, filters, SimpleFilter.AND);
        }
        // else just use the specified filter.

        Set<BundleCapability> matches = m_regCapSet.match(filter, false);

View Full Code Here


    }

    public ServiceReference[] getAllServiceReferences(String clazz,
            String filter) throws InvalidSyntaxException
    {
        SimpleFilter simple = null;
        if (filter != null)
        {
            try
            {
                simple = SimpleFilter.parse(filter);
View Full Code Here

TOP

Related Classes of org.apache.felix.connect.felix.framework.capabilityset.SimpleFilter

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.