Package org.osgi.service.discovery

Examples of org.osgi.service.discovery.ServiceEndpointDescription


       
        if (ServiceHookUtils.isCreatedByDsw(sref)) {
            return;
        }
       
        ServiceEndpointDescription sd = null;
        if (checkBundle()) {
            sd = OsgiUtils.getRemoteReference(sref, true);
        }
        // TODO
        // update DSW to check 'local' remote-services metadata either
View Full Code Here


        };
       
        ServiceReference sr = EasyMock.createNiceMock(ServiceReference.class);
        BundleContext dswContext = EasyMock.createNiceMock(BundleContext.class);
        BundleContext callingContext = EasyMock.createNiceMock(BundleContext.class);
        ServiceEndpointDescription sd = TestUtils.mockServiceDescription("Foo");
        EasyMock.replay(sr);
        EasyMock.replay(dswContext);
        EasyMock.replay(callingContext);
        EasyMock.replay(sd);
       
View Full Code Here

            }
        };
       
        ServiceReference sr = EasyMock.createNiceMock(ServiceReference.class);
        BundleContext callingContext = EasyMock.createNiceMock(BundleContext.class);
        ServiceEndpointDescription sd = TestUtils.mockServiceDescription("Foo");
        EasyMock.replay(sr);
        EasyMock.replay(callingContext);
        EasyMock.replay(sd);
       
        assertEquals("Precondition failed", 0, dp.getExposedServices().size());
View Full Code Here

        EasyMock.replay(sr);
        EasyMock.replay(callingContext);
       
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.POJO_ADDRESS_PROPERTY, "http://alternate_host:80/myString");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Runnable.class.getName(), props);
       
        assertEquals("Precondition failed", 0, dp.getExposedServices().size());
        p.createServer(sr, dswContext, callingContext, sd, String.class, myService);
        assertEquals(1, dp.getExposedServices().size());
        assertSame(sr, dp.getExposedServices().iterator().next());
View Full Code Here

            }       
        };
       
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.requires.intents", "A");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Arrays.asList(String.class.getName()), props);

        List<String> effectiveIntents =
            Arrays.asList(p.applyIntents(dswContext, callingContext, features, factory, sd));
        assertEquals(Arrays.asList("A"), effectiveIntents);
    }   
View Full Code Here

            }       
        };
       
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.requires.intents", "transactionality confidentiality.message");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Arrays.asList(String.class.getName()), props);

        List<String> effectiveIntents =
            Arrays.asList(p.applyIntents(dswContext, callingContext, features, factory, sd));
        assertTrue(effectiveIntents.contains("transactionality"));       
        assertTrue(effectiveIntents.contains("confidentiality.message"));       
View Full Code Here

            }           
        };

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.requires.intents", "A B");
        ServiceEndpointDescription sd =
            new ServiceEndpointDescriptionImpl(Arrays.asList(String.class.getName()), props);

        try {
            p.applyIntents(dswContext, callingContext, features, factory, sd);
            fail("applyIntents() should have thrown an exception as there was an unsatisfiable intent");
View Full Code Here

            }       
        };
       
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.requires.intents", "A");
        ServiceEndpointDescription sd =
            new ServiceEndpointDescriptionImpl(Arrays.asList(String.class.getName()), props);
       
        List<String> effectiveIntents =
            Arrays.asList(p.applyIntents(dswContext, callingContext, features, factory, sd));
        assertEquals(3, effectiveIntents.size());
View Full Code Here

            }           
        };

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.requires.intents", "A");
        ServiceEndpointDescription sd =
            new ServiceEndpointDescriptionImpl(Arrays.asList(String.class.getName()), props);
       
        List<String> effectiveIntents =
            Arrays.asList(p.applyIntents(dswContext, callingContext, features, factory, sd));
        assertEquals(3, effectiveIntents.size());
View Full Code Here

            }           
        };

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.requires.intents", "A SOAP.1_2");
        ServiceEndpointDescription sd =
            new ServiceEndpointDescriptionImpl(Arrays.asList(String.class.getName()), props);
       
        List<String> effectiveIntents =
            Arrays.asList(p.applyIntents(dswContext, callingContext, features, factory, sd));
        assertEquals(2, effectiveIntents.size());
View Full Code Here

TOP

Related Classes of org.osgi.service.discovery.ServiceEndpointDescription

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.