Examples of ServiceEndpointDescriptionImpl


Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

        };

        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");
        } catch (IntentUnsatifiedException iue) {
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

        };
       
        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());
        assertTrue(effectiveIntents.contains("Prov"));
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

        };

        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());
        assertTrue(effectiveIntents.contains("A"));
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

        };

        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());
        assertTrue(effectiveIntents.contains("A"));
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

        DistributionProviderImpl dp = new DistributionProviderImpl(dswContext);

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.requires.intents", requestedIntents);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Arrays.asList(String.class.getName()), props);
       
        PojoConfigurationTypeHandler p = new PojoConfigurationTypeHandler(dswContext, dp, handlerProps) {
            @Override
            IntentMap getIntentMap(BundleContext ctx) {
                if (ctx == callingContext) {
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

       
        DistributionProviderImpl dp = new DistributionProviderImpl(dswContext);

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.requires.intents", "B A");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Arrays.asList(String.class.getName()), props);
       
        PojoConfigurationTypeHandler p = new PojoConfigurationTypeHandler(dswContext, dp, handlerProps) {
            @Override
            IntentMap getIntentMap(BundleContext ctx) {
                if (ctx == callingContext) {
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

public class JaxRSUtilsTest extends TestCase  {

  public void testNoGlobalProviders() {
    Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
       
        assertEquals(0, JaxRSUtils.getProviders(null, null, sd).size());
  }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

 
  public void testAegisProvider() {
    Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.RS_DATABINDING_PROP_KEY, "aegis");
        props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
       
        List<Object> providers = JaxRSUtils.getProviders(null, null, sd);
        assertEquals(1, providers.size());
        assertEquals(AegisElementProvider.class.getName(), providers.get(0).getClass().getName());
  }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

 
  public void testServiceProviders() {
    Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.RS_PROVIDER_PROP_KEY, new Object[]{new AegisElementProvider()});
        props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
       
        List<Object> providers = JaxRSUtils.getProviders(null, null, sd);
        assertEquals(1, providers.size());
        assertEquals(AegisElementProvider.class.getName(), providers.get(0).getClass().getName());
  }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

        props.put(Constants.RS_PROVIDER_PROP_KEY,
            "\r\n org.apache.cxf.jaxrs.provider.AegisElementProvider , \r\n"
            + "org.apache.cxf.jaxrs.provider.JAXBElementProvider\r\n");
       
        props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
       
        List<Object> providers = JaxRSUtils.getProviders(bc, null, sd);
        assertEquals(2, providers.size());
        assertEquals(AegisElementProvider.class.getName(), providers.get(0).getClass().getName());
        assertEquals(JAXBElementProvider.class.getName(), providers.get(1).getClass().getName());
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.