You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2017/11/06 00:17:21 UTC

[GitHub] johnament commented on a change in pull request #331: [CXF-7535] Adding client & server support for Project Reactor

johnament commented on a change in pull request #331: [CXF-7535] Adding client & server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r148976878
 
 

 ##########
 File path: rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##########
 @@ -0,0 +1,178 @@
+/**
+ * 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.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+    private static final String TRACE = "TRACE";
+    private final WebClient webClient;
+    private final Scheduler scheduler;
+
+    FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+        this.webClient = webClient;
+        this.scheduler = executorService == null ? null : Schedulers.fromExecutorService(executorService);
+    }
+
+    @Override
+    public Flux get() {
 
 Review comment:
   Should be fixed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services