org.apache.camel.util.KeyValueHolder Java Examples
The following examples show how to use
org.apache.camel.util.KeyValueHolder.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RouteIT.java From fcrepo-camel-toolbox with Apache License 2.0 | 6 votes |
@Override protected void addServicesOnStartup(final Map<String, KeyValueHolder<Object, Dictionary>> services) { final String jmsPort = System.getProperty("fcrepo.dynamic.jms.port", "61616"); final String webPort = System.getProperty("fcrepo.dynamic.test.port", "8080"); final ActiveMQComponent component = new ActiveMQComponent(); component.setBrokerURL("tcp://localhost:" + jmsPort); component.setExposeAllQueues(true); final FcrepoComponent fcrepo = new FcrepoComponent(); fcrepo.setBaseUrl("http://localhost:" + webPort + "/fcrepo/rest"); fcrepo.setAuthUsername(FEDORA_USERNAME); fcrepo.setAuthPassword(FEDORA_PASSWORD); services.put("broker", asService(component, "osgi.jndi.service.name", "fcrepo/Broker")); services.put("fcrepo", asService(fcrepo, "osgi.jndi.service.name", "fcrepo/Camel")); }
Example #2
Source File: RouteTest.java From fcrepo-camel-toolbox with Apache License 2.0 | 6 votes |
@Override protected void addServicesOnStartup(final Map<String, KeyValueHolder<Object, Dictionary>> services) { final String cacheDir = System.getProperty("project.build.directory", "target") + "/ldcache-" + randomAlphabetic(5); final LDCachingBackend backend; try { backend = new LDCachingFileBackend(new File(cacheDir)); backend.initialize(); } catch (final RepositoryException ex) { throw new RuntimeException("Could not initialize LDCache backend at " + cacheDir, ex); } services.put(LDCachingBackend.class.getName(), asService(backend, "osgi.jndi.service.name", "fcrepo/LDCacheBackend")); }
Example #3
Source File: RouteWithFunctionsTest.java From fcrepo-camel-toolbox with Apache License 2.0 | 6 votes |
@Override protected void addServicesOnStartup(final Map<String, KeyValueHolder<Object, Dictionary>> services) { final String cacheDir = System.getProperty("project.build.directory", "target") + "/ldcache-" + randomAlphabetic(5); final LDCachingBackend backend; try { backend = new LDCachingFileBackend(new File(cacheDir)); backend.initialize(); } catch (final RepositoryException ex) { throw new RuntimeException("Could not initialize LDCache backend at " + cacheDir, ex); } services.put(LDCachingBackend.class.getName(), asService(backend, "osgi.jndi.service.name", "fcrepo/LDCacheBackend")); }
Example #4
Source File: RouteIT.java From fcrepo-camel-toolbox with Apache License 2.0 | 5 votes |
@Override protected void addServicesOnStartup(final Map<String, KeyValueHolder<Object, Dictionary>> services) { final String fcrepoPort = System.getProperty("fcrepo.dynamic.test.port", "8080"); final FcrepoComponent component = new FcrepoComponent(); component.setBaseUrl("http://localhost:" + fcrepoPort + "/fcrepo/rest"); component.setAuthUsername(FEDORA_USERNAME); component.setAuthPassword(FEDORA_PASSWORD); services.put("fcrepo", asService(component, "osgi.jndi.service.name", "fcrepo/Camel")); }
Example #5
Source File: RouteIT.java From fcrepo-camel-toolbox with Apache License 2.0 | 5 votes |
@Override protected void addServicesOnStartup(final Map<String, KeyValueHolder<Object, Dictionary>> services) { final String jmsPort = System.getProperty("fcrepo.dynamic.jms.port", "61616"); final String webPort = System.getProperty("fcrepo.dynamic.test.port", "8080"); final ActiveMQComponent amq = new ActiveMQComponent(); amq.setBrokerURL("tcp://localhost:" + jmsPort); amq.setExposeAllQueues(true); final FcrepoComponent fcrepo = new FcrepoComponent(); fcrepo.setBaseUrl("http://localhost:" + webPort + "/fcrepo/rest"); fcrepo.setAuthUsername(FEDORA_AUTH_USERNAME); fcrepo.setAuthPassword(FEDORA_AUTH_PASSWORD); services.put("broker", asService(amq, "osgi.jndi.service.name", "fcrepo/Broker")); services.put("fcrepo", asService(fcrepo, "osgi.jndi.service.name", "fcrepo/Camel")); }
Example #6
Source File: RouteIT.java From fcrepo-camel-toolbox with Apache License 2.0 | 5 votes |
@Override protected void addServicesOnStartup(final Map<String, KeyValueHolder<Object, Dictionary>> services) { final String jmsPort = System.getProperty("fcrepo.dynamic.jms.port", "61616"); final ActiveMQComponent component = new ActiveMQComponent(); component.setBrokerURL("tcp://localhost:" + jmsPort); component.setExposeAllQueues(true); services.put("broker", asService(component, "osgi.jndi.service.name", "fcrepo/Broker")); }
Example #7
Source File: BlueprintServiceTest.java From camelinaction2 with Apache License 2.0 | 4 votes |
@Override protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) { // create our fake mock service which will send the message to "mock:audit" MockAuditService mock = new MockAuditService(); services.put(AuditService.class.getName(), asService(mock, null)); }