camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nferr...@apache.org
Subject [1/6] camel git commit: CAMEL-10650: using registry then factory to create the service (and tests)
Date Fri, 27 Jan 2017 14:35:00 GMT
Repository: camel
Updated Branches:
  refs/heads/master 353eeefb6 -> 90846b586


CAMEL-10650: using registry then factory to create the service (and tests)


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/90846b58
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/90846b58
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/90846b58

Branch: refs/heads/master
Commit: 90846b586c5160ee098f9c292d0ad1a655fe4d2a
Parents: 9cbda1a
Author: Nicola Ferraro <ni.ferraro@gmail.com>
Authored: Fri Jan 27 13:13:01 2017 +0100
Committer: Nicola Ferraro <ni.ferraro@gmail.com>
Committed: Fri Jan 27 15:31:31 2017 +0100

----------------------------------------------------------------------
 .../streams/ReactiveStreamsConsumer.java        |   4 +-
 .../streams/ReactiveStreamsEndpoint.java        |  13 +++
 .../streams/ReactiveStreamsProducer.java        |   7 +-
 .../streams/api/CamelReactiveStreams.java       |  78 +++++++++++---
 .../api/CamelReactiveStreamsService.java        |   7 --
 .../engine/CamelReactiveStreamsServiceImpl.java |   4 -
 .../camel/reactive-streams/default-service      |  18 ++++
 .../streams/CamelReactiveStreamsTest.java       |  94 +++++++++++++++++
 .../support/ReactiveStreamsTestService.java     | 103 +++++++++++++++++++
 .../apache/camel/reactive-streams/test-service  |  18 ++++
 10 files changed, 315 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConsumer.java
b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConsumer.java
index 73d807f..081bbf4 100644
--- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConsumer.java
+++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsConsumer.java
@@ -51,13 +51,13 @@ public class ReactiveStreamsConsumer extends DefaultConsumer {
             executor = getEndpoint().getCamelContext().getExecutorServiceManager().newFixedThreadPool(this,
getEndpoint().getEndpointUri(), poolSize);
         }
 
-        CamelReactiveStreams.get(endpoint.getCamelContext()).attachConsumer(endpoint.getStream(),
this);
+        CamelReactiveStreams.get(endpoint.getCamelContext(), endpoint.getServiceName()).attachConsumer(endpoint.getStream(),
this);
     }
 
     @Override
     protected void doStop() throws Exception {
         super.doStop();
-        CamelReactiveStreams.get(endpoint.getCamelContext()).detachConsumer(endpoint.getStream());
+        CamelReactiveStreams.get(endpoint.getCamelContext(), endpoint.getServiceName()).detachConsumer(endpoint.getStream());
 
         if (executor != null) {
             endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor);

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java
b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java
index 0e72c52..07a74e3 100644
--- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java
+++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsEndpoint.java
@@ -40,6 +40,9 @@ public class ReactiveStreamsEndpoint extends DefaultEndpoint {
     @UriParam(label = "consumer", defaultValue = "1")
     private int concurrentConsumers = 1;
 
+    @UriParam
+    private String serviceName;
+
     public ReactiveStreamsEndpoint(String endpointUri, ReactiveStreamsComponent component)
{
         super(endpointUri, component);
     }
@@ -94,4 +97,14 @@ public class ReactiveStreamsEndpoint extends DefaultEndpoint {
         this.concurrentConsumers = concurrentConsumers;
     }
 
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    /**
+     * Allows using an alternative CamelReactiveStreamService implementation. The implementation
is looked up from the registry.
+     */
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsProducer.java
b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsProducer.java
index 3d90179..824f18d 100644
--- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsProducer.java
+++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/ReactiveStreamsProducer.java
@@ -25,7 +25,9 @@ import org.apache.camel.impl.DefaultAsyncProducer;
 /**
  * The Camel reactive-streams producer.
  */
-public class ReactiveStreamsProducer<T> extends DefaultAsyncProducer {
+public class ReactiveStreamsProducer extends DefaultAsyncProducer {
+
+    private ReactiveStreamsEndpoint endpoint;
 
     private String name;
 
@@ -33,6 +35,7 @@ public class ReactiveStreamsProducer<T> extends DefaultAsyncProducer
{
 
     public ReactiveStreamsProducer(ReactiveStreamsEndpoint endpoint, String name) {
         super(endpoint);
+        this.endpoint = endpoint;
         this.name = name;
     }
 
@@ -51,7 +54,7 @@ public class ReactiveStreamsProducer<T> extends DefaultAsyncProducer
{
     @Override
     protected void doStart() throws Exception {
         super.doStart();
-        this.service = CamelReactiveStreams.get(getEndpoint().getCamelContext());
+        this.service = CamelReactiveStreams.get(endpoint.getCamelContext(), endpoint.getServiceName());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreams.java
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreams.java
b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreams.java
index 01bf23d..506ab10 100644
--- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreams.java
+++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreams.java
@@ -16,8 +16,12 @@
  */
 package org.apache.camel.component.reactive.streams.api;
 
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
 import org.apache.camel.CamelContext;
-import org.apache.camel.component.reactive.streams.engine.CamelReactiveStreamsServiceImpl;
+import org.apache.camel.spi.FactoryFinder;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -32,6 +36,8 @@ public final class CamelReactiveStreams {
 
     private static final Logger LOG = LoggerFactory.getLogger(CamelReactiveStreams.class);
 
+    private static Map<CamelContext, String> serviceNames = new ConcurrentHashMap<>();
+
     private CamelReactiveStreams() {
     }
 
@@ -40,37 +46,77 @@ public final class CamelReactiveStreams {
     }
 
     public static CamelReactiveStreamsService get(CamelContext context, String serviceName)
{
-        CamelReactiveStreamsService service = context.hasService(CamelReactiveStreamsService.class);
-        if (service == null) {
-            service = resolveReactiveStreamsService(context, serviceName);
-            try {
-                context.addService(service, true, true);
-            } catch (Exception ex) {
-                throw new IllegalStateException("Cannot add the CamelReactiveStreamsService
to the Camel context", ex);
-            }
+        if (serviceName != null && serviceName.trim().length() == 0) {
+            throw new IllegalArgumentException("the service name cannot be an empty String");
         }
 
-        if (!ObjectHelper.equal(service.getName(), serviceName)) {
+        String lookupName = serviceName != null ? serviceName : "";
+        serviceNames.computeIfAbsent(context, ctx -> {
+            CamelReactiveStreamsService service = context.hasService(CamelReactiveStreamsService.class);
+            if (service == null) {
+                service = resolveReactiveStreamsService(context, serviceName);
+                try {
+                    context.addService(service, true, true);
+                } catch (Exception ex) {
+                    throw new IllegalStateException("Cannot add the CamelReactiveStreamsService
to the Camel context", ex);
+                }
+            }
+
+            return lookupName;
+        });
+
+        if (!ObjectHelper.equal(serviceNames.get(context), lookupName)) {
             // only a single implementation of the CamelReactiveStreamService can be present
per Camel context
             throw new IllegalArgumentException("Cannot use two different implementations
of CamelReactiveStreamsService in the same CamelContext: "
-                    + "existing service name [" + service.getName() + "] - requested [" +
serviceName + "]");
+                    + "existing service name [" + serviceNames.get(context) + "] - requested
[" + lookupName + "]");
         }
 
-        return service;
+        return context.hasService(CamelReactiveStreamsService.class);
     }
 
     private static CamelReactiveStreamsService resolveReactiveStreamsService(CamelContext
context, String serviceName) {
         CamelReactiveStreamsService service = null;
         if (serviceName != null) {
+            // lookup in the registry
             service = context.getRegistry().lookupByNameAndType(serviceName, CamelReactiveStreamsService.class);
-        }
 
-        if (service == null) {
-            LOG.info("Using default reactive stream service");
-            service = new CamelReactiveStreamsServiceImpl();
+            if (service == null) {
+                service = resolveServiceUsingFactory(context, serviceName);
+            }
+        } else {
+            Set<CamelReactiveStreamsService> set = context.getRegistry().findByType(CamelReactiveStreamsService.class);
+            if (set.size() == 1) {
+                service = set.iterator().next();
+            }
+
+            if (service == null) {
+                LOG.info("Using default reactive stream service");
+                service = resolveServiceUsingFactory(context, null);
+            }
         }
 
         return service;
     }
 
+    @SuppressWarnings("unchecked")
+    private static CamelReactiveStreamsService resolveServiceUsingFactory(CamelContext context,
String name) {
+        if (name == null) {
+            name = "default-service";
+        }
+
+        String path = "META-INF/services/org/apache/camel/reactive-streams/";
+        Class<? extends CamelReactiveStreamsService> serviceClass = null;
+        try {
+            FactoryFinder finder = context.getFactoryFinder(path);
+            LOG.trace("Using FactoryFinder: {}", finder);
+            serviceClass = (Class<? extends CamelReactiveStreamsService>) finder.findClass(name);
+            return serviceClass.newInstance();
+        } catch (ClassNotFoundException e) {
+            throw new IllegalStateException("Class referenced in '" + path + name + "' not
found", e);
+        } catch (Exception e) {
+            throw new IllegalStateException("Unable to create the reactive stream service
defined in '" + path + name + "'", e);
+        }
+
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java
b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java
index a397ce9..57c635e 100644
--- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java
+++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/api/CamelReactiveStreamsService.java
@@ -111,11 +111,4 @@ public interface CamelReactiveStreamsService extends CamelContextAware,
Service
      */
     void detachConsumer(String name);
 
-    /**
-     * Returns the name of this service implementation if present.
-     * The name of any named implementation must match their lookup key in the registry.
-     * @return the name of the service implementation or null (for the default implementation)
-     */
-    String getName();
-
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/engine/CamelReactiveStreamsServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/engine/CamelReactiveStreamsServiceImpl.java
b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/engine/CamelReactiveStreamsServiceImpl.java
index ac171de..ef617be 100644
--- a/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/engine/CamelReactiveStreamsServiceImpl.java
+++ b/components/camel-reactive-streams/src/main/java/org/apache/camel/component/reactive/streams/engine/CamelReactiveStreamsServiceImpl.java
@@ -131,8 +131,4 @@ public class CamelReactiveStreamsServiceImpl implements CamelReactiveStreamsServ
         return this.context;
     }
 
-    @Override
-    public String getName() {
-        return null;
-    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/main/resources/META-INF/services/org/apache/camel/reactive-streams/default-service
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/main/resources/META-INF/services/org/apache/camel/reactive-streams/default-service
b/components/camel-reactive-streams/src/main/resources/META-INF/services/org/apache/camel/reactive-streams/default-service
new file mode 100644
index 0000000..2ce7448
--- /dev/null
+++ b/components/camel-reactive-streams/src/main/resources/META-INF/services/org/apache/camel/reactive-streams/default-service
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+class=org.apache.camel.component.reactive.streams.engine.CamelReactiveStreamsServiceImpl

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/CamelReactiveStreamsTest.java
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/CamelReactiveStreamsTest.java
b/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/CamelReactiveStreamsTest.java
new file mode 100644
index 0000000..149e317
--- /dev/null
+++ b/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/CamelReactiveStreamsTest.java
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.reactive.streams;
+
+import org.apache.camel.component.reactive.streams.api.CamelReactiveStreams;
+import org.apache.camel.component.reactive.streams.api.CamelReactiveStreamsService;
+import org.apache.camel.component.reactive.streams.engine.CamelReactiveStreamsServiceImpl;
+import org.apache.camel.component.reactive.streams.support.ReactiveStreamsTestService;
+import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+
+public class CamelReactiveStreamsTest extends CamelTestSupport {
+
+    @Test
+    public void testDefaultService() {
+        CamelReactiveStreamsService service1 = CamelReactiveStreams.get(context, "default-service");
+        assertTrue(service1 instanceof CamelReactiveStreamsServiceImpl);
+    }
+
+    @Test
+    public void testSameDefaultServiceReturned() {
+        CamelReactiveStreamsService service1 = CamelReactiveStreams.get(context, "default-service");
+        CamelReactiveStreamsService service2 = CamelReactiveStreams.get(context, "default-service");
+        assertTrue(service1 instanceof CamelReactiveStreamsServiceImpl);
+        assertEquals(service1, service2);
+    }
+
+    @Test
+    public void testSameServiceReturnedFromRegistry() {
+        CamelReactiveStreamsService service1 = CamelReactiveStreams.get(context);
+        CamelReactiveStreamsService service2 = CamelReactiveStreams.get(context);
+
+        assertEquals(service1, service2);
+        assertTrue(service1 instanceof ReactiveStreamsTestService);
+        assertEquals("from-registry", ((ReactiveStreamsTestService) service1).getName());
+    }
+
+    @Test
+    public void testSameNamedServiceReturnedFromRegistry() {
+        CamelReactiveStreamsService service1 = CamelReactiveStreams.get(context, "dummy");
+        CamelReactiveStreamsService service2 = CamelReactiveStreams.get(context, "dummy");
+
+        assertEquals(service1, service2);
+        assertTrue(service1 instanceof ReactiveStreamsTestService);
+        assertEquals("from-registry", ((ReactiveStreamsTestService) service1).getName());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testOnlyOneService() {
+        CamelReactiveStreams.get(context);
+        CamelReactiveStreams.get(context, "dummy");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testOnlyOneNamedService() {
+        CamelReactiveStreams.get(context, "dummy");
+        CamelReactiveStreams.get(context, "dummy2");
+    }
+
+    @Test
+    public void testNamedServiceResolvedUsingFactory() {
+        CamelReactiveStreamsService service1 = CamelReactiveStreams.get(context, "test-service");
+        assertTrue(service1 instanceof ReactiveStreamsTestService);
+        assertNull(((ReactiveStreamsTestService) service1).getName());
+    }
+
+    @Override
+    protected JndiRegistry createRegistry() throws Exception {
+        JndiRegistry registry = super.createRegistry();
+        registry.bind("dummy", new ReactiveStreamsTestService("from-registry"));
+        return registry;
+    }
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java
b/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java
new file mode 100644
index 0000000..b46c9ff
--- /dev/null
+++ b/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/support/ReactiveStreamsTestService.java
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.reactive.streams.support;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.reactive.streams.ReactiveStreamsConsumer;
+import org.apache.camel.component.reactive.streams.api.CamelReactiveStreamsService;
+import org.apache.camel.component.reactive.streams.api.DispatchCallback;
+import org.reactivestreams.Publisher;
+import org.reactivestreams.Subscriber;
+
+/**
+ * Test (dummy) service for reactive streams.
+ */
+public class ReactiveStreamsTestService implements CamelReactiveStreamsService {
+
+    private String name;
+
+    public ReactiveStreamsTestService() {
+    }
+
+    public ReactiveStreamsTestService(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public void start() throws Exception {
+
+    }
+
+    @Override
+    public void setCamelContext(CamelContext camelContext) {
+
+    }
+
+    @Override
+    public void stop() throws Exception {
+
+    }
+
+    @Override
+    public CamelContext getCamelContext() {
+        return null;
+    }
+
+    @Override
+    public Publisher<Exchange> getPublisher(String name) {
+        return null;
+    }
+
+    @Override
+    public <T> Publisher<T> getPublisher(String name, Class<T> type) {
+        return null;
+    }
+
+    @Override
+    public Subscriber<Exchange> getSubscriber(String name) {
+        return null;
+    }
+
+    @Override
+    public <T> Subscriber<T> getSubscriber(String name, Class<T> type)
{
+        return null;
+    }
+
+    @Override
+    public void process(String name, Exchange exchange, DispatchCallback<Exchange>
callback) {
+
+    }
+
+    @Override
+    public void attachConsumer(String name, ReactiveStreamsConsumer consumer) {
+
+    }
+
+    @Override
+    public void detachConsumer(String name) {
+
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/90846b58/components/camel-reactive-streams/src/test/resources/META-INF/services/org/apache/camel/reactive-streams/test-service
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/src/test/resources/META-INF/services/org/apache/camel/reactive-streams/test-service
b/components/camel-reactive-streams/src/test/resources/META-INF/services/org/apache/camel/reactive-streams/test-service
new file mode 100644
index 0000000..03f7827
--- /dev/null
+++ b/components/camel-reactive-streams/src/test/resources/META-INF/services/org/apache/camel/reactive-streams/test-service
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+class=org.apache.camel.component.reactive.streams.support.ReactiveStreamsTestService


Mime
View raw message