You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2019/12/19 09:14:20 UTC

[plc4x] branch next-gen-core updated: finetuned Plc4xProtocolBase.java

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch next-gen-core
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/next-gen-core by this push:
     new 5ffb700  finetuned Plc4xProtocolBase.java
5ffb700 is described below

commit 5ffb700d87d48ad517a03dc511e23f9dd22f6999
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Dec 19 10:13:59 2019 +0100

    finetuned Plc4xProtocolBase.java
---
 .../java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java | 15 +++++++--------
 .../plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java |  2 --
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java
index 33e5618..f8fd0a2 100644
--- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java
+++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/Plc4xProtocolBase.java
@@ -19,22 +19,21 @@
 
 package org.apache.plc4x.java.spi;
 
-import org.apache.plc4x.java.spi.internal.HandlerRegistration;
 import org.apache.plc4x.java.spi.messages.PlcRequestContainer;
 
-import java.util.function.Consumer;
-
 public abstract class Plc4xProtocolBase<T> {
 
-    private Consumer<HandlerRegistration> acceptHandler;
-
-    public Plc4xProtocolBase(Class<T> clazz) {
-    }
-
     public void onConnect(ConversationContext<T> context) {
         // Intentionally do nothing here
     }
 
+    /**
+     * @param context
+     * @param msg
+     * @throws Exception
+     * @deprecated will be replaced by direct calls
+     */
+    @Deprecated
     protected abstract void encode(ConversationContext<T> context, PlcRequestContainer msg) throws Exception;
 
     /**
diff --git a/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java b/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java
index 32c55c9..9c0e3fd 100644
--- a/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java
+++ b/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java
@@ -71,8 +71,6 @@ public class Plc4xS7Protocol extends Plc4xProtocolBase<TPKTPacket> {
 
     public Plc4xS7Protocol(int callingTsapId, int calledTsapId, COTPTpduSize tpduSize,
                            int maxAmqCaller, int maxAmqCallee, S7ControllerType controllerType) {
-        // FIXME REMOVE
-        super(TPKTPacket.class);
         this.callingTsapId = callingTsapId;
         this.calledTsapId = calledTsapId;
         this.cotpTpduSize = tpduSize;