cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] reta commented on a change in pull request #482: [CXF-7926] Initial MP Rest Client 1.2 impl
Date Sun, 16 Dec 2018 19:47:19 GMT
reta commented on a change in pull request #482: [CXF-7926] Initial MP Rest Client 1.2 impl
URL: https://github.com/apache/cxf/pull/482#discussion_r241993338
 
 

 ##########
 File path: rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/CxfTypeSafeClientBuilder.java
 ##########
 @@ -76,8 +132,32 @@ public RestClientBuilder executorService(ExecutorService executor) {
                 }
             }
         }
+
+        final String interfaceName = aClass.getName();
+        Optional<Long> timeout = ConfigFacade.getOptionalValue(
+            String.format(REST_CONN_TIMEOUT_FORMAT, interfaceName), Long.class).map(
+                timeoutValue -> {
+                    connectTimeout(timeoutValue, TimeUnit.MILLISECONDS);
+                    return timeoutValue;
+                });
+        if (!timeout.isPresent() && LOG.isLoggable(Level.FINEST)) {
+            LOG.finest("connectionTimeout set by MP Config: " + timeout.get());
+        }
+        timeout = ConfigFacade.getOptionalValue(
+            String.format(REST_READ_TIMEOUT_FORMAT, interfaceName), Long.class).map(
+                timeoutValue -> {
+                    readTimeout(timeoutValue, TimeUnit.MILLISECONDS);
+                    return timeoutValue;
+                });
+        if (!timeout.isPresent() && LOG.isLoggable(Level.FINEST)) {
+            LOG.finest("readTimeout set by MP Config: " + timeout.get());
+        }
+
+        for (RestClientListener listener : listeners()) {
 
 Review comment:
   Minor, `listeners().forEach(l -> l.onNewClient(aClass, this));`

----------------------------------------------------------------
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

Mime
View raw message