Package org.apache.servicemix.nmr.api.internal

Examples of org.apache.servicemix.nmr.api.internal.InternalReference.choose()


            if (exchange.getDestination() == null) {
                InternalReference target = (InternalReference) exchange.getTarget();
                assert target != null;
                boolean match = false;
                boolean securityMatch = false;
                for (InternalEndpoint endpoint : target.choose()) {
                    match = true;
                    if (authorizationService != null) {
                        Set<GroupPrincipal> acls = authorizationService.getAcls(endpoint.getId(), exchange.getOperation());
                        if (!acls.contains(GroupPrincipal.ANY)) {
                            Subject subject = exchange.getIn().getSecuritySubject();
View Full Code Here


        Endpoint endpoint = new DummyEndpoint();
        Reference ref = registry.lookup(ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(ref);
        assertTrue(ref instanceof InternalReference);
        InternalReference r = (InternalReference) ref;
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
View Full Code Here

        Reference ref = registry.lookup(ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(ref);
        assertTrue(ref instanceof InternalReference);
        InternalReference r = (InternalReference) ref;
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
        assertNotNull(r.choose(registry));
View Full Code Here

        assertTrue(ref instanceof InternalReference);
        InternalReference r = (InternalReference) ref;
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
    }
View Full Code Here

        InternalReference r = (InternalReference) ref;
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
    }
View Full Code Here

        assertFalse(r.choose(registry).iterator().hasNext());
        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
    }

    public void testLdapFilter() throws Exception {
        System.setProperty("org.osgi.vendor.framework", "org.apache.servicemix.nmr.core");
View Full Code Here

        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
    }

    public void testLdapFilter() throws Exception {
        System.setProperty("org.osgi.vendor.framework", "org.apache.servicemix.nmr.core");
View Full Code Here

        Endpoint endpoint = new DummyEndpoint();
        Reference ref = registry.lookup("(NAME=id)");
        assertNotNull(ref);
        assertTrue(ref instanceof InternalReference);
        InternalReference r = (InternalReference) ref;
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
View Full Code Here

        Reference ref = registry.lookup("(NAME=id)");
        assertNotNull(ref);
        assertTrue(ref instanceof InternalReference);
        InternalReference r = (InternalReference) ref;
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
        assertNotNull(r.choose(registry));
View Full Code Here

        assertTrue(ref instanceof InternalReference);
        InternalReference r = (InternalReference) ref;
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
        registry.register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
        assertNotNull(r.choose(registry));
        assertTrue(r.choose(registry).iterator().hasNext());
        registry.unregister(endpoint, null);
        assertNotNull(r.choose(registry));
        assertFalse(r.choose(registry).iterator().hasNext());
    }
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.