Package org.talend.esb.servicelocator.client

Examples of org.talend.esb.servicelocator.client.SLPropertiesImpl.addProperty()


        names.clear();
        names.add(ENDPOINTURL);

        SLPropertiesImpl slPropertiesImpl = new SLPropertiesImpl();
        List<String> list = new ArrayList<String>();
        slPropertiesImpl.addProperty("test", list);

        expect(sl.lookup(SERVICE_NAME)).andStubReturn(names);
        expect(sl.getEndpoint(SERVICE_NAME, ENDPOINTURL)).andStubReturn(
                endpoint);
        expect(endpoint.getProperties()).andStubReturn(slPropertiesImpl);
View Full Code Here


        names.clear();
        names.add(ENDPOINTURL);

        SLPropertiesImpl slPropertiesImpl = new SLPropertiesImpl();
        List<String> list = new ArrayList<String>();
        slPropertiesImpl.addProperty("test", list);

        expect(sl.lookup(SERVICE_NAME)).andStubReturn(names);
        expect(sl.getEndpoint(SERVICE_NAME, ENDPOINTURL)).andStubReturn(
                endpoint);
        expect(endpoint.getProperties()).andStubReturn(slPropertiesImpl);
View Full Code Here

            SLPropertiesImpl slProps = null;
            if (!arg0.getEntryType().isEmpty()) {
                slProps = new SLPropertiesImpl();
                List<EntryType> entries = arg0.getEntryType();
                for (EntryType entry : entries) {
                    slProps.addProperty(entry.getKey(), entry.getValue());
                }
            }
            Endpoint simpleEndpoint =
                new SimpleEndpoint(serviceName, endpointURL, bindingType, transportType, slProps);
            locatorClient.register(simpleEndpoint, true);
View Full Code Here

            SLPropertiesImpl slProps = null;
            if (properties != null) {
                slProps = new SLPropertiesImpl();
                List<EntryType> entries = properties.getEntry();
                for (EntryType entry : entries) {
                    slProps.addProperty(entry.getKey(), entry.getValue());
                }
            }
            SimpleEndpoint eprProvider = new SimpleEndpoint(serviceName,
                    endpointURL, bindingType, transportType, slProps);
View Full Code Here

        SLPropertiesImpl slProperties = new SLPropertiesImpl();
       
        for (EntryType entry : props.getEntry()) {
            String key = entry.getKey();
            List<String> values = entry.getValue();
            slProperties.addProperty(key, values);
        }
       
        return slProperties;
    }
View Full Code Here

    public static final String VALUE_3 = "value3";

    @Test
    public void slProperties2JAXBSlPropertiesType() throws Exception {
        SLPropertiesImpl props = new SLPropertiesImpl();
        props.addProperty(KEY_1, VALUE_1, VALUE_2);
        props.addProperty(KEY_2, VALUE_2, VALUE_3);
       
        ServiceLocatorPropertiesType jaxbProperties = SLPropertiesConverter.toServiceLocatorPropertiesType(props);
        List<EntryType> entries = jaxbProperties.getEntry();
        List<String> values =  entries.get(0).getValue();
View Full Code Here

    @Test
    public void slProperties2JAXBSlPropertiesType() throws Exception {
        SLPropertiesImpl props = new SLPropertiesImpl();
        props.addProperty(KEY_1, VALUE_1, VALUE_2);
        props.addProperty(KEY_2, VALUE_2, VALUE_3);
       
        ServiceLocatorPropertiesType jaxbProperties = SLPropertiesConverter.toServiceLocatorPropertiesType(props);
        List<EntryType> entries = jaxbProperties.getEntry();
        List<String> values =  entries.get(0).getValue();
        assertEquals(VALUE_1, values.get(0));
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.