Package org.impalaframework.service

Examples of org.impalaframework.service.ServiceReferenceFilter


        } else {
            supportedTypes = proxyTypes;
            exportTypesOnly = false;
        }
       
        ServiceReferenceFilter filter = serviceActivityNotifiable.getServiceReferenceFilter();
        Collection<ServiceRegistryEntry> services = serviceRegistry.getServices(filter, supportedTypes, exportTypesOnly);
        for (ServiceRegistryEntry entry : services) {
            if (matchesTypes(serviceActivityNotifiable, entry)) {
                serviceActivityNotifiable.add(entry);
            }
View Full Code Here


        ServiceRegistryEntry entry = event.getServiceRegistryEntry();
        handleReferenceAdded(entry);
    }

    void handleReferenceAdded(ServiceRegistryEntry entry) {
        ServiceReferenceFilter filter = serviceActivityNotifiable.getServiceReferenceFilter();
       
        boolean isStatic = entry.getServiceBeanReference().isStatic();
        if (!isStatic) {
            boolean allowNonStaticReferences = serviceActivityNotifiable.getAllowNonStaticReferences();
            if (!allowNonStaticReferences) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Service entry " + entry + " filtered out as bean reference is static, but target " +
                            ObjectUtils.identityToString(serviceActivityNotifiable) +
                            "does not support non-static reference");
                }
                return;
            }
        }
       
        final boolean typeMatches;
       
        Class<?>[] exportTypes = serviceActivityNotifiable.getExportTypes();
        if (!ArrayUtils.isNullOrEmpty(exportTypes)) {
           
            //do check against export types in registry
            typeMatches = getServiceRegistry().isPresentInExportTypes(entry, exportTypes);
        } else {

            //do check against actual implemented types
            typeMatches = matchesTypes(serviceActivityNotifiable, entry);
        }
       
        if (typeMatches && filter.matches(entry)) {
            serviceActivityNotifiable.add(entry);
        }
    }
View Full Code Here

        } else {
            supportedTypes = proxyTypes;
            exportTypesOnly = false;
        }
       
        ServiceReferenceFilter filter = serviceActivityNotifiable.getServiceReferenceFilter();
        Collection<ServiceRegistryEntry> services = serviceRegistry.getServices(filter, supportedTypes, exportTypesOnly);
        for (ServiceRegistryEntry entry : services) {
            if (matchesTypes(serviceActivityNotifiable, entry)) {
                serviceActivityNotifiable.add(entry);
            }
View Full Code Here

        ServiceRegistryEntry entry = event.getServiceRegistryEntry();
        handleReferenceAdded(entry);
    }

    void handleReferenceAdded(ServiceRegistryEntry entry) {
        ServiceReferenceFilter filter = serviceActivityNotifiable.getServiceReferenceFilter();
       
        boolean isStatic = entry.getServiceBeanReference().isStatic();
        if (!isStatic) {
            boolean allowNonStaticReferences = serviceActivityNotifiable.getAllowNonStaticReferences();
            if (!allowNonStaticReferences) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Service entry " + entry + " filtered out as bean reference is static, but target " +
                            ObjectUtils.identityToString(serviceActivityNotifiable) +
                        "does not support non-static reference");
                }
                return;
            }
        }
       
        final boolean typeMatches;
       
        Class<?>[] exportTypes = serviceActivityNotifiable.getExportTypes();
        if (!ArrayUtils.isNullOrEmpty(exportTypes)) {
           
            //do check against export types in registry
            typeMatches = getServiceRegistry().isPresentInExportTypes(entry, exportTypes);
        } else {

            //do check against actual implemented types
            typeMatches = matchesTypes(serviceActivityNotifiable, entry);
        }
       
        if (typeMatches && filter.matches(entry)) {
            serviceActivityNotifiable.add(entry);
        }
    }
View Full Code Here

        registryaddService("bean1", "module1", service1, classLoader);
        registryaddService("bean2", "module2", service2, classLoader);
       
        assertEquals(2, entryDelegate.getServices(ServiceEntryRegistryDelegate.IDENTIFY_FILTER, null, false).size());
       
        assertEquals(0, registry.getServices(new ServiceReferenceFilter(){
            public boolean matches(ServiceRegistryEntry reference) {
                return false;
            }}, null, false).size());
    }
View Full Code Here

        } else {
            supportedTypes = proxyTypes;
            exportTypesOnly = false;
        }
       
        ServiceReferenceFilter filter = serviceActivityNotifiable.getServiceReferenceFilter();
        Collection<ServiceRegistryEntry> services = serviceRegistry.getServices(filter, supportedTypes, exportTypesOnly);
        for (ServiceRegistryEntry entry : services) {
            if (matchesTypes(serviceActivityNotifiable, entry)) {
                serviceActivityNotifiable.add(entry);
            }
View Full Code Here

        ServiceRegistryEntry entry = event.getServiceRegistryEntry();
        handleReferenceAdded(entry);
    }

    void handleReferenceAdded(ServiceRegistryEntry entry) {
        ServiceReferenceFilter filter = serviceActivityNotifiable.getServiceReferenceFilter();
       
        boolean isStatic = entry.getServiceBeanReference().isStatic();
        if (!isStatic) {
            boolean allowNonStaticReferences = serviceActivityNotifiable.getAllowNonStaticReferences();
            if (!allowNonStaticReferences) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Service entry " + entry + " filtered out as bean reference is static, but target " +
                            ObjectUtils.identityToString(serviceActivityNotifiable) +
                            "does not support non-static reference");
                }
                return;
            }
        }
       
        final boolean typeMatches;
       
        Class<?>[] exportTypes = serviceActivityNotifiable.getExportTypes();
        if (!ArrayUtils.isNullOrEmpty(exportTypes)) {
           
            //do check against export types in registry
            typeMatches = getServiceRegistry().isPresentInExportTypes(entry, exportTypes);
        } else {

            //do check against actual implemented types
            typeMatches = matchesTypes(serviceActivityNotifiable, entry);
        }
       
        if (typeMatches && filter.matches(entry)) {
            serviceActivityNotifiable.add(entry);
        }
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.service.ServiceReferenceFilter

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.