Examples of LdapServiceReferenceFilter


Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        serviceRegistry = createMock(ServiceRegistry.class);
        filter = new LdapServiceReferenceFilter("(name=value)");
        this.targetSource = new FilteredServiceRegistryTargetSource(String.class, filter, serviceRegistry);
    }
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    public void init() {
        Assert.notNull(this.serviceRegistry, "serviceRegistry cannot be null");

        if (this.filter == null) {
            Assert.notNull(this.filterExpression, "filterExpression and filter both cannot be null");
            this.filter = new LdapServiceReferenceFilter(filterExpression);
        }

        this.serviceRegistryMonitor = new ServiceRegistryMonitor();
        this.serviceRegistryMonitor.setServiceRegistry(serviceRegistry);
        this.serviceRegistryMonitor.setServiceActivityNotifiable(this);
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    public void init() {
        Assert.notNull(this.serviceRegistry, "serviceRegistry cannot be null");

        if (this.filter == null) {
            Assert.notNull(this.filterExpression, "filterExpression and filter both cannot be null");
            this.filter = new LdapServiceReferenceFilter(filterExpression);
        }

        this.serviceRegistryMonitor = new ServiceRegistryMonitor();
        this.serviceRegistryMonitor.setServiceRegistry(serviceRegistry);
        this.serviceRegistryMonitor.setServiceActivityNotifiable(this);
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    public void testHandleServiceNoTypes() {
       
        BasicServiceRegistryEntry ref = new StaticServiceRegistryEntry("service", "beanName", "module", null, Collections.singletonMap("name", "somevalue"), ClassUtils.getDefaultClassLoader());
       
        expect(serviceActivityNotifiable.getServiceReferenceFilter()).andReturn(new LdapServiceReferenceFilter("(name=*)"));
        expect(serviceActivityNotifiable.getProxyTypes()).andReturn(null);
        expect(serviceActivityNotifiable.getExportTypes()).andReturn(null);
       
        expect(serviceActivityNotifiable.add(ref)).andReturn(true);
       
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    public void testHandleServiceWithCorrectTypes() {
       
        BasicServiceRegistryEntry ref = new StaticServiceRegistryEntry("service", "beanName", "module", null, Collections.singletonMap("name", "somevalue"), ClassUtils.getDefaultClassLoader());
       
        expect(serviceActivityNotifiable.getServiceReferenceFilter()).andReturn(new LdapServiceReferenceFilter("(name=*)"));
        expect(serviceActivityNotifiable.getProxyTypes()).andReturn(new Class<?>[] {String.class});
        expect(serviceActivityNotifiable.getExportTypes()).andReturn(null);
       
        expect(serviceActivityNotifiable.add(ref)).andReturn(true);
       
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

                return false;
            }
           
        }, "beanName", "module", null, Collections.singletonMap("name", "somevalue"), ClassUtils.getDefaultClassLoader());
       
        expect(serviceActivityNotifiable.getServiceReferenceFilter()).andReturn(new LdapServiceReferenceFilter("(name=*)"));
        expect(serviceActivityNotifiable.getAllowNonStaticReferences()).andReturn(false);
       
        replay(serviceActivityNotifiable);
        monitor.handleReferenceAdded(ref);
        verify(serviceActivityNotifiable);
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    public void testTypeNotMatches() {
       
        BasicServiceRegistryEntry ref = new StaticServiceRegistryEntry("service", "beanName", "module", null, Collections.singletonMap("name", "somevalue"), ClassUtils.getDefaultClassLoader());
       
        expect(serviceActivityNotifiable.getServiceReferenceFilter()).andReturn(new LdapServiceReferenceFilter("(name=*)"));
        expect(serviceActivityNotifiable.getProxyTypes()).andReturn(new Class<?>[] {Integer.class});
        expect(serviceActivityNotifiable.getExportTypes()).andReturn(null);
        //no call to add
       
        replay(serviceActivityNotifiable);
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

   
    public void testWithExportTypesNotMatches() {
       
        BasicServiceRegistryEntry ref = new StaticServiceRegistryEntry("service", "beanName", "module", null, Collections.singletonMap("name", "somevalue"), ClassUtils.getDefaultClassLoader());
       
        expect(serviceActivityNotifiable.getServiceReferenceFilter()).andReturn(new LdapServiceReferenceFilter("(name=*)"));
        Class<?>[] exportTypes = new Class<?>[] {Integer.class};
        expect(serviceActivityNotifiable.getExportTypes()).andReturn(exportTypes);
        expect(serviceRegistry.isPresentInExportTypes(ref, exportTypes)).andReturn(false);
        //no call to add
       
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

   
    public void testWithExportTypesMatches() {
       
        BasicServiceRegistryEntry ref = new StaticServiceRegistryEntry("service", "beanName", "module", null, Collections.singletonMap("name", "somevalue"), ClassUtils.getDefaultClassLoader());
       
        expect(serviceActivityNotifiable.getServiceReferenceFilter()).andReturn(new LdapServiceReferenceFilter("(name=*)"));
        Class<?>[] exportTypes = new Class<?>[] {Integer.class};
        expect(serviceActivityNotifiable.getExportTypes()).andReturn(exportTypes);
        expect(serviceRegistry.isPresentInExportTypes(ref, exportTypes)).andReturn(true);
       
        expect(serviceActivityNotifiable.add(ref)).andReturn(true);
View Full Code Here

Examples of org.impalaframework.service.filter.ldap.LdapServiceReferenceFilter

    public void testHandleServiceNotMatches() {
       
        BasicServiceRegistryEntry ref = new StaticServiceRegistryEntry("service", "beanName", "module", null, Collections.singletonMap("name", "somevalue"), ClassUtils.getDefaultClassLoader());
       
        expect(serviceActivityNotifiable.getServiceReferenceFilter()).andReturn(new LdapServiceReferenceFilter("(missing=*)"));
        expect(serviceActivityNotifiable.getProxyTypes()).andReturn(null);
        expect(serviceActivityNotifiable.getExportTypes()).andReturn(null);
       
        replay(serviceActivityNotifiable);
        monitor.handleReferenceAdded(ref);
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.