Package org.openengsb.core.api

Examples of org.openengsb.core.api.ConnectorManager


    }

    @Test
    public void testServiceDoesNotExist_shouldNotFindExampleDomain() throws Exception {
        File watchfile = tempFolder.newFile("testfile.csv");
        ConnectorManager connectorManager = getOsgiService(ConnectorManager.class);
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put("watchfile", watchfile.getAbsolutePath());
        attributes.put("serializer", "org.openengsb.connector.virtual.filewatcher.internal.CSVParser");
        attributes.put("mixin.1", EventSupport.class.getName());
        attributes.put("modelType", "org.openengsb.domain.example.model.SourceModelA");
        Map<String, Object> properties = new HashMap<String, Object>();
        ConnectorDescription connectorDescription =
            new ConnectorDescription("example", "filewatcher", attributes, properties);
        connectorManager.create(connectorDescription);
        getOsgiService(ExampleDomain.class, 30000L);
        Thread.sleep(1500);
        FileUtils.write(watchfile, "\"foo\",\"bar\"");
        Thread.sleep(1500);
        QueryInterface queryInterface = getOsgiService(QueryInterface.class);
View Full Code Here


    private String addTestService() {
        if (testServiceId != null) {
            return testServiceId;
        }
        ConnectorManager connectorManager = getOsgiService(ConnectorManager.class);
        ConnectorDescription connectorDescription = new ConnectorDescription("authentication", "composite-connector");
        Map<String, String> attributes =
            Maps.newHashMap(ImmutableMap.of("compositeStrategy", "authentication.provider", "queryString",
                "(foo=bar)"));
        connectorDescription.setAttributes(attributes);
        testServiceId = connectorManager.create(connectorDescription);
        return testServiceId;
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.api.ConnectorManager

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.