private boolean checkRestrictorService(RestrictorCheck pCheck, Object ... args) {
        try {
            ServiceReference[] serviceRefs = bundleContext.getServiceReferences(Restrictor.class.getName(),null);
            if (serviceRefs != null) {
                boolean ret = true;
                boolean found = false;
                for (ServiceReference serviceRef : serviceRefs) {
                    Restrictor restrictor = (Restrictor) bundleContext.getService(serviceRef);
                    if (restrictor != null) {
                        ret = ret && pCheck.check(restrictor,args);
                        found = true;
                    }
                }
                return found && ret;
            } else {
                return false;
            }
        } catch (InvalidSyntaxException e) {
            // Will not happen, since we dont use a filter here
            throw new IllegalArgumentException("Impossible exception (we don't use a filter for fetching the services)",e);
        }
    }
private boolean checkRestrictorService ( RestrictorCheck pCheck , Object ... args ) { try { ServiceReference [ ] serviceRefs = bundleContext . getServiceReferences ( Restrictor . class . getName ( ) , null ) ; if ( serviceRefs != null ) { boolean ret = true ; boolean found = false ; for ( ServiceReference serviceRef : serviceRefs ) { Restrictor restrictor = ( Restrictor ) bundleContext . getService ( serviceRef ) ; if ( restrictor != null ) { ret = ret && pCheck . check ( restrictor , args ) ; found = true ; } } return found && ret ; } else { return false ; } } catch ( InvalidSyntaxException e ) { throw new IllegalArgumentException ( "Impossible exception (we don't use a filter for fetching the services)" , e ) ; } }
Actual check which delegate to one or more restrictor services if available.

@param pCheck a function object for performing the actual check
@param args arguments passed through to the  check
@return true if all checks return true