plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-plc4x] chrisdutz commented on a change in pull request #59: Feature/alternate plc4 x 108
Date Wed, 10 Apr 2019 09:51:05 GMT
chrisdutz commented on a change in pull request #59: Feature/alternate plc4 x 108
URL: https://github.com/apache/incubator-plc4x/pull/59#discussion_r273877508
 
 

 ##########
 File path: plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/connection/AbstractPlcConnection.java
 ##########
 @@ -43,15 +38,18 @@ Licensed to the Apache Software Foundation (ASF) under one
  */
 public abstract class AbstractPlcConnection implements PlcConnection, PlcConnectionMetadata
{
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractPlcConnection.class);
-
-    private static final int PING_TIMEOUT_MS = 1_000;
-
     @Override
     public PlcConnectionMetadata getMetadata() {
         return this;
     }
 
+    @Override
+    public CompletableFuture<Void> ping() {
+        CompletableFuture<Void> future = new CompletableFuture<>();
+        future.completeExceptionally(new PlcUnsupportedOperationException("The connection
does not support pinging"));
 
 Review comment:
   Ha! ... I knew there was something ... if I used the failedFuture method, we would have
to bump up the Java level to 9 which I wasn't planning on doing just for this one convenience
method.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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