Package org.apache.cxf.dosgi.dsw.service

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


                "\r\n org.apache.cxf.jaxrs.provider.AegisElementProvider",
                "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


    EasyMock.expectLastCall().andReturn(false);
    bc.getService(sref);
    AegisElementProvider p = new AegisElementProvider();
    EasyMock.expectLastCall().andReturn(p);
    EasyMock.replay(bc, sref);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface");
       
        List<Object> providers = JaxRSUtils.getProviders(bc, null, sd);
        assertEquals(1, providers.size());
        assertSame(p, providers.get(0));
  }
View Full Code Here

    AegisElementProvider p = new AegisElementProvider();
    EasyMock.expectLastCall().andReturn(p);
    EasyMock.replay(bc);
    Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.RS_PROVIDER_EXPECTED_PROP_KEY, "true");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
       
        List<Object> providers = JaxRSUtils.getProviders(bc, null, sd);
        assertEquals(0, providers.size());
  }
View Full Code Here

    AegisElementProvider p = new AegisElementProvider();
    EasyMock.expectLastCall().andReturn(p);
    EasyMock.replay(bc, sref);
    Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.RS_PROVIDER_EXPECTED_PROP_KEY, "true");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
       
        List<Object> providers = JaxRSUtils.getProviders(bc, null, sd);
        assertEquals(1, providers.size());
        assertSame(p, providers.get(0));
  }
View Full Code Here

        EasyMock.replay(sr);
        EasyMock.replay(callingContext);

        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.WS_HTTP_SERVICE_CONTEXT, "/myRunnable");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Runnable.class.getName(), props);
       
        assertEquals("Precondition failed", 0, dp.getExposedServices().size());
        assertEquals("Precondition failed", "", sfb.getAddress());
        h.createServer(sr, dswContext, callingContext, sd, Runnable.class, myService);
        assertEquals("The address should be set to '/'. The Servlet context dictates the actual location.", "/", sfb.getAddress());
View Full Code Here

        BundleContext callingContext = EasyMock.createNiceMock(BundleContext.class);
        EasyMock.replay(sr);
        EasyMock.replay(callingContext);

        Map<String, Object> props = new HashMap<String, Object>();
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Runnable.class.getName(), props);
       
        assertEquals("Precondition failed", 0, dp.getExposedServices().size());
        h.createServer(sr, dswContext, callingContext, sd, Runnable.class, myService);
        assertEquals(1, dp.getExposedServices().size());
        assertSame(sr, dp.getExposedServices().iterator().next());
View Full Code Here

        EasyMock.replay(callingContext);

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.configuration.type", Constants.WS_CONFIG_TYPE);
        props.put(Constants.WS_HTTP_SERVICE_CONTEXT, "/myRunnable");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Runnable.class.getName(), props);
       
        assertEquals("Precondition failed", 0, dp.getExposedServices().size());
        h.createServer(sr, dswContext, callingContext, sd, Runnable.class, myService);
        assertEquals(1, dp.getExposedServices().size());
        assertSame(sr, dp.getExposedServices().iterator().next());
View Full Code Here

                                                             userProperties,
                                                             matchAllNames);
        setAdditionalProperties(sref, userProperties);
       
        if (srefs.isEmpty()) {
            return new ServiceEndpointDescriptionImpl(Arrays.asList(names), userProperties);
        }
       
        return srefs.get(0);
    }
View Full Code Here

                continue;
            }

            Map<String, Object> remoteProps = new HashMap<String, Object>(userProperties);
            addProperties(remoteProps, ref.getChildren(PROPERTY_ELEMENT, ns));
            srefs.add(new ServiceEndpointDescriptionImpl(iNames, remoteProps));           
        }
        return srefs;
       
    }
View Full Code Here

                        if (iNames[i].equals(iface)) {
                            props.put(root, value);
                        }
                    }
                }
                list[i] = new ServiceEndpointDescriptionImpl(iNames[i], props);
            }
        }
        return list;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

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.