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

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


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


                continue;
            }

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

        List<ServiceEndpointDescription> srefs = new ArrayList<ServiceEndpointDescription>();
        Namespace ns = Namespace.getNamespace(REMOTE_SERVICES_NS);
        for (Element ref : references) {
            List<String> iNames = getProvidedInterfaces(ref.getChildren(PROVIDE_INTERFACE_ELEMENT, ns));
            Map<String, Object> remoteProps = getProperties(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

        BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
        EasyMock.replay(bc);
       
        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface");
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.POJO_CONFIG_TYPE);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);

        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        // use default for this: sdProps.put(Constants.CONFIG_TYPE_PROPERTY, Constants.POJO_CONFIG_TYPE);
        sdProps.put(Constants.POJO_ADDRESS_PROPERTY, "http://localhost:9876/abcd");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);

        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.POJO_CONFIG_TYPE);
        sdProps.put(Constants.POJO_HTTP_SERVICE_CONTEXT, "/abc");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);
       
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof HttpServiceConfigurationTypeHandler);
View Full Code Here

       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.POJO_CONFIG_TYPE);
        sdProps.put(Constants.POJO_ADDRESS_PROPERTY, "http://localhost:9876/abcd");
        sdProps.put(Constants.POJO_HTTP_SERVICE_CONTEXT, "/abc");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);
       
        assertNull("Should not get a handler as this is a conflict situation",
                f.getHandler(bc, sd, null, new HashMap<String, Object>()));
    }
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.WSDL_CONFIG_TYPE);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);
       
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof WsdlConfigurationTypeHandler);       
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.