Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add encryption handler for OPC UA - Minor fix for Kafka Connector #225

Merged
merged 4 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,3 @@ build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegen
is licensed under the Category A: "UNLICENSE" which is available here:
UNLICENSE file in the licenses directory.

The files:
plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/OPCUAServer.java
plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/KeyStoreLoader.java
plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/backend/Plc4xNamespace.java
are derivative works of the Eclipse Milo project and are licensed under the EPL 2.0 license.
2 changes: 0 additions & 2 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ The Netty project (https://netty.io/).

----------------------------------------------

This product includes software developed at
The Eclipse Milo project (https://projects.eclipse.org/projects/iot.milo/)
5 changes: 5 additions & 0 deletions plc4j/integrations/apache-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<!--dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Licensed to the Apache Software Foundation (ASF) under one
*/
package org.apache.plc4x.kafka;

import org.apache.commons.lang3.math.NumberUtils;
import org.apache.kafka.common.config.Config;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.common.config.ConfigValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Licensed to the Apache Software Foundation (ASF) under one
import org.apache.plc4x.kafka.config.Constants;
import org.apache.plc4x.kafka.util.VersionUtil;

import java.util.concurrent.ExecutionException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ Licensed to the Apache Software Foundation (ASF) under one

import org.apache.kafka.common.config.Config;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.common.config.ConfigException;
import org.apache.kafka.common.config.ConfigValue;
import org.apache.kafka.connect.connector.Task;
import org.apache.kafka.connect.source.SourceConnector;
import org.apache.plc4x.java.PlcDriverManager;
import org.apache.plc4x.java.api.exceptions.PlcConnectionException;
import org.apache.plc4x.kafka.config.Field;
import org.apache.plc4x.kafka.config.*;
import org.apache.plc4x.kafka.util.VersionUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Licensed to the Apache Software Foundation (ASF) under one
*/
package org.apache.plc4x.kafka;

import org.apache.commons.lang3.RandomUtils;
import org.apache.kafka.common.config.AbstractConfig;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.data.*;
Expand All @@ -43,8 +44,6 @@ Licensed to the Apache Software Foundation (ASF) under one
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Duration;
import java.time.Instant;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -243,7 +242,7 @@ public List<SourceRecord> poll() {
} else {
try {
List<SourceRecord> result = new ArrayList<>(1);
SourceRecord temp = buffer.poll(pollReturnInterval, TimeUnit.MILLISECONDS);
SourceRecord temp = buffer.poll(pollReturnInterval + RandomUtils.nextInt(0, (int) Math.round(pollReturnInterval*0.05)), TimeUnit.MILLISECONDS);
if (temp == null) {
return null;
}
Expand Down
14 changes: 6 additions & 8 deletions plc4j/integrations/opcua-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>

<dependency>
<groupId>org.eclipse.milo</groupId>
Expand Down Expand Up @@ -183,7 +178,7 @@
<scope>runtime</scope>
</dependency>

<!-- Logging dependancies -->
<!-- Logging dependancies -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15on</artifactId>
Expand All @@ -208,7 +203,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand All @@ -219,6 +213,11 @@
<artifactId>vavr</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -278,7 +277,6 @@
<configuration>
<usedDependencies combine.children="append">
<usedDependency>org.slf4j:slf4j-simple</usedDependency>
<usedDependency>org.bouncycastle:bcpkix-jdk15on</usedDependency>
<usedDependency>org.bouncycastle:bcmail-jdk15on</usedDependency>
<usedDependency>org.apache.plc4x:plc4j-driver-ab-eth</usedDependency>
<!--usedDependency>org.apache.plc4x:plc4j-driver-ads</usedDependency-->
Expand Down

This file was deleted.

Loading