diff --git a/src/java/kafkabridge/pom.xml b/src/java/kafkabridge/pom.xml index 12ba92b304..050873a84a 100644 --- a/src/java/kafkabridge/pom.xml +++ b/src/java/kafkabridge/pom.xml @@ -9,7 +9,7 @@ mases.kafkabridge Apache Kafka interface bridging implementation https://github.com/masesgroup/KafkaBridge - 1.1.8.0 + 1.1.9.0 diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AbortTransactionResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AbortTransactionResult.cs index 696ab0aa36..2ecc6e33c0 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AbortTransactionResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AbortTransactionResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Clients.Admin { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterClientQuotasResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterClientQuotasResult.cs index e886ee5ff9..057bb79c25 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterClientQuotasResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterClientQuotasResult.cs @@ -18,7 +18,7 @@ using MASES.KafkaBridge.Common; using MASES.KafkaBridge.Common.Quota; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterConfigsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterConfigsResult.cs index 67ea4e9b93..da4be42049 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterConfigsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterConfigsResult.cs @@ -18,7 +18,7 @@ using MASES.KafkaBridge.Common; using MASES.KafkaBridge.Common.Config; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterConsumerGroupOffsetsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterConsumerGroupOffsetsResult.cs index 396ed02e2f..36b81f2722 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterConsumerGroupOffsetsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterConsumerGroupOffsetsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Clients.Admin { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterPartitionReassignmentsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterPartitionReassignmentsResult.cs index edcc44a139..42931f0ab2 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterPartitionReassignmentsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterPartitionReassignmentsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterReplicaLogDirsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterReplicaLogDirsResult.cs index e2b6078f9c..c19d42a0f9 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterReplicaLogDirsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterReplicaLogDirsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterUserScramCredentialsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterUserScramCredentialsResult.cs index 13f2876d97..ff1a44aed5 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterUserScramCredentialsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/AlterUserScramCredentialsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreateAclsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreateAclsResult.cs index 201dfae33b..15e04f9c20 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreateAclsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreateAclsResult.cs @@ -18,7 +18,7 @@ using MASES.KafkaBridge.Common; using MASES.KafkaBridge.Common.Acl; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreatePartitionsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreatePartitionsResult.cs index cea0b838f3..bf978295df 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreatePartitionsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreatePartitionsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreateTopicsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreateTopicsResult.cs index 43ac612b83..a838ef7e73 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreateTopicsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/CreateTopicsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteConsumerGroupOffsetsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteConsumerGroupOffsetsResult.cs index ae1180c3b2..a7fd5c9ba0 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteConsumerGroupOffsetsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteConsumerGroupOffsetsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Clients.Admin { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteConsumerGroupsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteConsumerGroupsResult.cs index ee44140dad..aa32188cfd 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteConsumerGroupsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteConsumerGroupsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteRecordsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteRecordsResult.cs index cb0aa97066..234970367a 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteRecordsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteRecordsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteTopicsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteTopicsResult.cs index a99ee94b97..4096822396 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteTopicsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/DeleteTopicsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/ElectLeadersResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/ElectLeadersResult.cs index 956f55868d..44a6f691c1 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/ElectLeadersResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/ElectLeadersResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/ListConsumerGroupsResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/ListConsumerGroupsResult.cs index 677e1ab4c0..cfdd2faebe 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/ListConsumerGroupsResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/ListConsumerGroupsResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/RemoveMembersFromConsumerGroupResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/RemoveMembersFromConsumerGroupResult.cs index c40b9eb205..47611b8d61 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/RemoveMembersFromConsumerGroupResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/RemoveMembersFromConsumerGroupResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Clients.Admin { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/UnregisterBrokerResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/UnregisterBrokerResult.cs index 92744c2532..4a477c0021 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/UnregisterBrokerResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/UnregisterBrokerResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Clients.Admin { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/UpdateFeaturesResult.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/UpdateFeaturesResult.cs index dca874c19a..ef0b522f6c 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/UpdateFeaturesResult.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Admin/UpdateFeaturesResult.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Clients.Admin diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Consumer/ConsumerRebalanceListener.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Consumer/ConsumerRebalanceListener.cs index c1fa9bd85a..6210550d3a 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Consumer/ConsumerRebalanceListener.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Consumer/ConsumerRebalanceListener.cs @@ -41,12 +41,12 @@ public interface IConsumerRebalanceListener : IJVMBridgeBase } /// - /// Listener for Kafka ConsumerRebalanceListener. Extends , implements + /// Listener for Kafka ConsumerRebalanceListener. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class ConsumerRebalanceListener : CLRListener, IConsumerRebalanceListener + public class ConsumerRebalanceListener : JVMBridgeListener, IConsumerRebalanceListener { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.clients.consumer.ConsumerRebalanceListenerImpl"; readonly Action> revokedFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Consumer/OffsetCommitCallback.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Consumer/OffsetCommitCallback.cs index 00bedb7b9b..4e7cef58ee 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Consumer/OffsetCommitCallback.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Consumer/OffsetCommitCallback.cs @@ -38,12 +38,12 @@ public interface IOffsetCommitCallback : IJVMBridgeBase } /// - /// Listener for Kafka OffsetCommitCallback. Extends , implements + /// Listener for Kafka OffsetCommitCallback. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class OffsetCommitCallback : CLRListener, IOffsetCommitCallback + public class OffsetCommitCallback : JVMBridgeListener, IOffsetCommitCallback { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.clients.consumer.OffsetCommitCallbackImpl"; readonly Action, JVMBridgeException> executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Producer/Callback.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Producer/Callback.cs index 77966ba203..cb389a3428 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Producer/Callback.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Clients/Producer/Callback.cs @@ -36,12 +36,12 @@ public interface ICallback : IJVMBridgeBase } /// - /// Listener for Kafka Callback. Extends , implements + /// Listener for Kafka Callback. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class Callback : CLRListener, ICallback + public class Callback : JVMBridgeListener, ICallback { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.clients.producer.CallbackImpl"; readonly Action executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/KafkaFuture.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/KafkaFuture.cs index 8cfcc69d7e..69e37ac090 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/KafkaFuture.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/KafkaFuture.cs @@ -16,7 +16,7 @@ * Refer to LICENSE for more information. */ -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util.Concurrent; namespace MASES.KafkaBridge.Common diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Deserializer.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Deserializer.cs index b264eff9e2..b4c1fd23c7 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Deserializer.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Deserializer.cs @@ -58,9 +58,9 @@ public interface IDeserializer : IDeserializer /// /// The data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class Deserializer : CLRListener, IDeserializer + public class Deserializer : JVMBridgeListener, IDeserializer { - /// + /// public override string ClassName => "org.mases.kafkabridge.clients.common.serialization.DeserializerImpl"; readonly Func deserialize = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Serdes.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Serdes.cs index 1d9218933a..05ac6f00bd 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Serdes.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Serdes.cs @@ -17,7 +17,8 @@ */ using MASES.KafkaBridge.Common.Utils; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; +using MASES.KafkaBridge.Java.Util; namespace MASES.KafkaBridge.Common.Serialization { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Serializer.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Serializer.cs index ff494326d9..6489048d75 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Serializer.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/Serializer.cs @@ -54,13 +54,13 @@ public interface ISerializer : ISerializer byte[] SerializeWithHeaders(string topic, Headers headers, E data); } /// - /// Listener for Kafka Serializer. Extends . Implements + /// Listener for Kafka Serializer. Extends . Implements /// /// The data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class Serializer : CLRListener, ISerializer + public class Serializer : JVMBridgeListener, ISerializer { - /// + /// public override string ClassName => "org.mases.kafkabridge.clients.common.serialization.SerializerImpl"; readonly Func serialize = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/VoidDeserializer.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/VoidDeserializer.cs index d57bf9ba2b..49326f7984 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/VoidDeserializer.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/VoidDeserializer.cs @@ -16,7 +16,7 @@ * Refer to LICENSE for more information. */ -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Common.Serialization { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/VoidSerializer.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/VoidSerializer.cs index ac993e699a..43221e0e7e 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/VoidSerializer.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Serialization/VoidSerializer.cs @@ -16,7 +16,7 @@ * Refer to LICENSE for more information. */ -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Common.Serialization { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Utils/Time.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Utils/Time.cs index 661a299409..b7e94817ef 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Utils/Time.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Common/Utils/Time.cs @@ -16,8 +16,8 @@ * Refer to LICENSE for more information. */ +using Java.Util.Function; using MASES.JCOBridge.C2JBridge; -using MASES.JCOBridge.C2JBridge.Function; namespace MASES.KafkaBridge.Common.Utils { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/ConnectSchema.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/ConnectSchema.cs index 83cb3825d0..c9e76c152d 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/ConnectSchema.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/ConnectSchema.cs @@ -17,6 +17,7 @@ */ using MASES.KafkaBridge.Java.Util; +using JavaLang = Java.Lang; namespace MASES.KafkaBridge.Connect.Data { @@ -30,12 +31,12 @@ public ConnectSchema() { } - public ConnectSchema(Type type, bool optional, Java.Lang.Object defaultValue, string name, int version, string doc, Map parameters, List fields, Schema keySchema, Schema valueSchema) + public ConnectSchema(Type type, bool optional, JavaLang.Object defaultValue, string name, int version, string doc, Map parameters, List fields, Schema keySchema, Schema valueSchema) : base(type, optional, defaultValue, name, version, doc, parameters, fields, keySchema, valueSchema) { } - public ConnectSchema(Type type, bool optional, Java.Lang.Object defaultValue, string name, int version, string doc) + public ConnectSchema(Type type, bool optional, JavaLang.Object defaultValue, string name, int version, string doc) :this(type, optional, defaultValue, name, version, doc, null, null, null, null) { } diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Schema.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Schema.cs index 454e7bd3eb..bb1680fc8c 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Schema.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Schema.cs @@ -18,6 +18,7 @@ using MASES.JCOBridge.C2JBridge; using MASES.KafkaBridge.Java.Util; +using JavaLang = Java.Lang; namespace MASES.KafkaBridge.Connect.Data { @@ -91,7 +92,7 @@ public interface ISchema : IJVMBridgeBase bool IsOptional { get; } - Java.Lang.Object DefaultValue(); + JavaLang.Object DefaultValue(); string Name(); @@ -131,7 +132,7 @@ public Schema(params object[] args) public bool IsOptional => IExecute("isOptional"); - public Java.Lang.Object DefaultValue() { return IExecute("defaultValue"); } + public JavaLang.Object DefaultValue() { return IExecute("defaultValue"); } public string Name() { return IExecute("name"); } diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/SchemaAndValue.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/SchemaAndValue.cs index 352fb47bda..85aeb6a10a 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/SchemaAndValue.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/SchemaAndValue.cs @@ -17,6 +17,7 @@ */ using MASES.JCOBridge.C2JBridge; +using JavaLang = Java.Lang; namespace MASES.KafkaBridge.Connect.Data { @@ -30,13 +31,13 @@ public SchemaAndValue() { } - public SchemaAndValue(Schema schema, Java.Lang.Object value) + public SchemaAndValue(Schema schema, JavaLang.Object value) :base(schema, value) { } public Schema Schema => IExecute("schema"); - public Java.Lang.Object Value => IExecute("value"); + public JavaLang.Object Value => IExecute("value"); } } diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/SchemaProjector.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/SchemaProjector.cs index 14b71c7aeb..3bd6a7bcc3 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/SchemaProjector.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/SchemaProjector.cs @@ -17,6 +17,7 @@ */ using MASES.JCOBridge.C2JBridge; +using JavaLang = Java.Lang; namespace MASES.KafkaBridge.Connect.Data { @@ -24,9 +25,9 @@ public class SchemaProjector : JVMBridgeBase { public override string ClassName => "org.apache.kafka.connect.data.SchemaProjector"; - public static Java.Lang.Object Project(Schema source, Java.Lang.Object record, Schema target) + public static JavaLang.Object Project(Schema source, JavaLang.Object record, Schema target) { - return SExecute("project", source, record, target); + return SExecute("project", source, record, target); } } } diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Struct.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Struct.cs index ff22a9a444..00a9818c79 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Struct.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Struct.cs @@ -18,6 +18,7 @@ using MASES.JCOBridge.C2JBridge; using MASES.KafkaBridge.Java.Util; +using JavaLang = Java.Lang; namespace MASES.KafkaBridge.Connect.Data { @@ -36,19 +37,19 @@ public Struct(Schema schema) public Schema Schema => IExecute("schema"); - public Java.Lang.Object Get(string fieldName) + public JavaLang.Object Get(string fieldName) { - return IExecute("get", fieldName); + return IExecute("get", fieldName); } - public Java.Lang.Object Get(Field field) + public JavaLang.Object Get(Field field) { - return IExecute("get", field); + return IExecute("get", field); } - public Java.Lang.Object GetWithoutDefault(string fieldName) + public JavaLang.Object GetWithoutDefault(string fieldName) { - return IExecute("getWithoutDefault", fieldName); + return IExecute("getWithoutDefault", fieldName); } public byte GetInt8(string fieldName) @@ -111,12 +112,12 @@ public Struct GetStruct(string fieldName) return IExecute("getStruct", fieldName); } - public Struct Put(string fieldName, Java.Lang.Object value) + public Struct Put(string fieldName, JavaLang.Object value) { return IExecute("put", fieldName, value); } - public Struct Put(Field field, Java.Lang.Object value) + public Struct Put(Field field, JavaLang.Object value) { return IExecute("put", field, value); } diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Values.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Values.cs index 8322e06e3a..74de598518 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Values.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Connect/Data/Values.cs @@ -19,6 +19,7 @@ using MASES.JCOBridge.C2JBridge; using MASES.KafkaBridge.Java.Math; using MASES.KafkaBridge.Java.Util; +using JavaLang = Java.Lang; namespace MASES.KafkaBridge.Connect.Data { @@ -26,82 +27,82 @@ public class Values : JVMBridgeBase { public override string ClassName => "org.apache.kafka.connect.data.Values"; - public static bool ConvertToBoolean(Schema schema, Java.Lang.Object value) + public static bool ConvertToBoolean(Schema schema, JavaLang.Object value) { return SExecute("convertToBoolean", schema, value); } - public static byte ConvertToByte(Schema schema, Java.Lang.Object value) + public static byte ConvertToByte(Schema schema, JavaLang.Object value) { return SExecute("convertToByte", schema, value); } - public static short ConvertToShort(Schema schema, Java.Lang.Object value) + public static short ConvertToShort(Schema schema, JavaLang.Object value) { return SExecute("convertToShort", schema, value); } - public static int ConvertToInteger(Schema schema, Java.Lang.Object value) + public static int ConvertToInteger(Schema schema, JavaLang.Object value) { return SExecute("convertToInteger", schema, value); } - public static long ConvertToLong(Schema schema, Java.Lang.Object value) + public static long ConvertToLong(Schema schema, JavaLang.Object value) { return SExecute("convertToLong", schema, value); } - public static float ConvertToFloat(Schema schema, Java.Lang.Object value) + public static float ConvertToFloat(Schema schema, JavaLang.Object value) { return SExecute("convertToFloat", schema, value); } - public static double ConvertToDouble(Schema schema, Java.Lang.Object value) + public static double ConvertToDouble(Schema schema, JavaLang.Object value) { return SExecute("convertToDouble", schema, value); } - public static string ConvertToString(Schema schema, Java.Lang.Object value) + public static string ConvertToString(Schema schema, JavaLang.Object value) { return SExecute("convertToString", schema, value); } - public static List ConvertToList(Schema schema, Java.Lang.Object value) + public static List ConvertToList(Schema schema, JavaLang.Object value) { return SExecute("convertToList", schema, value); } - public static Map ConvertToMap(Schema schema, Java.Lang.Object value) + public static Map ConvertToMap(Schema schema, JavaLang.Object value) { return SExecute("convertToMap", schema, value); } - public static Struct ConvertToStruct(Schema schema, Java.Lang.Object value) + public static Struct ConvertToStruct(Schema schema, JavaLang.Object value) { return SExecute("convertToStruct", schema, value); } - public static Java.Util.Date ConvertToTime(Schema schema, Java.Lang.Object value) + public static Java.Util.Date ConvertToTime(Schema schema, JavaLang.Object value) { return SExecute("convertToTime", schema, value); } - public static Java.Util.Date ConvertToDate(Schema schema, Java.Lang.Object value) + public static Java.Util.Date ConvertToDate(Schema schema, JavaLang.Object value) { return SExecute("convertToDate", schema, value); } - public static Java.Util.Date ConvertToTimestamp(Schema schema, Java.Lang.Object value) + public static Java.Util.Date ConvertToTimestamp(Schema schema, JavaLang.Object value) { return SExecute("convertToTimestamp", schema, value); } - public static BigDecimal ConvertToDecimal(Schema schema, Java.Lang.Object value, int scale) + public static BigDecimal ConvertToDecimal(Schema schema, JavaLang.Object value, int scale) { return SExecute("convertToDecimal", schema, value, scale); } - public static Schema InferSchema(Java.Lang.Object value) + public static Schema InferSchema(JavaLang.Object value) { return SExecute("inferSchema", value); } diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Annotation/Annotation.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Annotation/Annotation.cs deleted file mode 100644 index bf67e95f82..0000000000 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Annotation/Annotation.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* -* Copyright 2022 MASES s.r.l. -* -* Licensed 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. -* -* Refer to LICENSE for more information. -*/ - -using MASES.JCOBridge.C2JBridge; - -namespace MASES.KafkaBridge.Java.Lang -{ - public class Annotation : JVMBridgeBase - { - public override string ClassName => "java.lang.annotation.Annotation"; - - public Class AnnotationType => IExecute("annotationType"); - } -} diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Class.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Class.cs deleted file mode 100644 index 2868093af2..0000000000 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Class.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* -* Copyright 2022 MASES s.r.l. -* -* Licensed 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. -* -* Refer to LICENSE for more information. -*/ - -using MASES.JCOBridge.C2JBridge; -using MASES.JCOBridge.C2JBridge.JVMInterop; - -namespace MASES.KafkaBridge.Java.Lang -{ - public class Class : JVMBridgeBase - { - public override string ClassName => "java.lang.Class"; - - public static Class ForName(string className) - { - return SExecute("forName", className); - } - - public static Class ForName() where T : IJVMBridgeBase, new() - { - var className = new T().ClassName; - var exType = SExecute("forName", className); - return SExecute>("forName", className); - } - - public string Name => IExecute("getName"); - - public bool IsAnnotation => IExecute("isAnnotation"); - - // TO BE VERIFIED - //public bool IsAnnotationPresent(Class annotationClass) - // where T : Annotation - //{ - // return IExecute("isAnnotationPresent", annotationClass.JVMType); - //} - - public bool IsAnonymousClass => IExecute("isAnonymousClass"); - - public bool IsArray => IExecute("isArray"); - - public bool IsAssignableFrom(Class cls) => IExecute("isAssignableFrom", cls); - - public bool IsEnum => IExecute("isEnum"); - - public bool IsInstance(object obj) => IExecute("isInstance", obj); - - public bool IsInterface => IExecute("isInterface"); - - public bool IsLocalClass => IExecute("isLocalClass"); - - public bool IsMemberClass => IExecute("isMemberClass"); - - public bool IsPrimitive => IExecute("isPrimitive"); - - public bool IsSynthetic => IExecute("isSynthetic"); - } - - public class Class : Class - where T : IJVMBridgeBase, new() - { - - - public IJavaType JVMType => (new T() as IJVMBridgeBaseStatic).Clazz; - } -} diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Iterable.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Iterable.cs deleted file mode 100644 index d968896a03..0000000000 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Iterable.cs +++ /dev/null @@ -1,25 +0,0 @@ -/* -* Copyright 2022 MASES s.r.l. -* -* Licensed 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. -* -* Refer to LICENSE for more information. -*/ - -namespace MASES.KafkaBridge.Java.Lang -{ - public class Iterable : JCOBridge.C2JBridge.JVMBridgeBase> - { - public override string ClassName => "java.lang.Iterable"; - } -} diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Object.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Object.cs deleted file mode 100644 index 285937dbd3..0000000000 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Object.cs +++ /dev/null @@ -1,25 +0,0 @@ -/* -* Copyright 2022 MASES s.r.l. -* -* Licensed 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. -* -* Refer to LICENSE for more information. -*/ - -namespace MASES.KafkaBridge.Java.Lang -{ - public class Object : JCOBridge.C2JBridge.JVMBridgeBase - { - public override string ClassName => "java.lang.Object"; - } -} diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Throwable.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Throwable.cs deleted file mode 100644 index e95ec5284c..0000000000 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Throwable.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* -* Copyright 2022 MASES s.r.l. -* -* Licensed 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. -* -* Refer to LICENSE for more information. -*/ - -namespace MASES.KafkaBridge.Java.Lang -{ - public sealed class Throwable : JCOBridge.C2JBridge.JVMBridgeBase - { - public override string ClassName => "java.lang.Throwable"; - - public string Message => IExecute("getMessage"); - - public Throwable Cause => IExecute("getCause"); - } -} diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Void.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Void.cs deleted file mode 100644 index 9a5d1dc3bb..0000000000 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Lang/Void.cs +++ /dev/null @@ -1,27 +0,0 @@ -/* -* Copyright 2022 MASES s.r.l. -* -* Licensed 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. -* -* Refer to LICENSE for more information. -*/ - -namespace MASES.KafkaBridge.Java.Lang -{ - public sealed class Void : JCOBridge.C2JBridge.JVMBridgeBase - { - public override bool IsStatic => true; - - public override string ClassName => "java.lang.Void"; - } -} diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/ArrayList.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/ArrayList.cs index 0f4e0048aa..2d15ed1e48 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/ArrayList.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/ArrayList.cs @@ -16,7 +16,7 @@ * Refer to LICENSE for more information. */ -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Java.Util { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/Iterator.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/Iterator.cs index 0462bfee67..eae7d3df13 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/Iterator.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/Iterator.cs @@ -17,15 +17,27 @@ */ using MASES.JCOBridge.C2JBridge; +using System.Collections; +using System.Collections.Generic; namespace MASES.KafkaBridge.Java.Util { - public class Iterator : JVMBridgeBase> + public class Iterator : JVMBridgeBase>, IEnumerable { public override string ClassName => "java.util.Iterator"; public bool HasNext => IExecute("hasNext"); public E Next => IExecute("next"); + + public IEnumerator GetEnumerator() + { + return new JVMBridgeBaseEnumerator(Instance); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } } \ No newline at end of file diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/UUID.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/UUID.cs index 46c20762d9..329c874424 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/UUID.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Java/Util/UUID.cs @@ -16,7 +16,7 @@ * Refer to LICENSE for more information. */ -namespace MASES.KafkaBridge.Java.Lang +namespace MASES.KafkaBridge.Java.Util { public sealed class UUID : JCOBridge.C2JBridge.JVMBridgeBase { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Errors/StreamsUncaughtExceptionHandler.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Errors/StreamsUncaughtExceptionHandler.cs index 02b81b1345..f7e57494a1 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Errors/StreamsUncaughtExceptionHandler.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Errors/StreamsUncaughtExceptionHandler.cs @@ -43,12 +43,12 @@ public interface IStreamsUncaughtExceptionHandler : IJVMBridgeBase } /// - /// Listener for Kafka StreamsUncaughtExceptionHandler. Extends , implements + /// Listener for Kafka StreamsUncaughtExceptionHandler. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class StreamsUncaughtExceptionHandler : CLRListener, IStreamsUncaughtExceptionHandler + public class StreamsUncaughtExceptionHandler : JVMBridgeListener, IStreamsUncaughtExceptionHandler { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.errors.StreamsUncaughtExceptionHandlerImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Aggregator.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Aggregator.cs index c6b0a2e85f..122349a060 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Aggregator.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Aggregator.cs @@ -40,15 +40,15 @@ public interface IAggregator : IJVMBridgeBase } /// - /// Listener for Kafka Aggregator. Extends , implements + /// Listener for Kafka Aggregator. Extends , implements /// /// The data associated to the event /// The data associated to the event /// Aggregated value /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class Aggregator : CLRListener, IAggregator + public class Aggregator : JVMBridgeListener, IAggregator { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.AggregatorImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Branched.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Branched.cs index c36123f2a1..61b2262dc2 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Branched.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Branched.cs @@ -17,7 +17,7 @@ */ using MASES.JCOBridge.C2JBridge; -using MASES.JCOBridge.C2JBridge.Function; +using Java.Util.Function; namespace MASES.KafkaBridge.Streams.KStream { diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ForeachAction.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ForeachAction.cs index 9f53cfbe5d..6a6b282ef2 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ForeachAction.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ForeachAction.cs @@ -39,14 +39,14 @@ public interface IForeachAction : IJVMBridgeBase /// - /// Listener for Kafka ForeachAction. Extends , implements + /// Listener for Kafka ForeachAction. Extends , implements /// /// The data associated to the event /// The data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class ForeachAction : CLRListener, IForeachAction + public class ForeachAction : JVMBridgeListener, IForeachAction { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.ForeachActionImpl"; readonly Action executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Initializer.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Initializer.cs index bc9ca5dcf3..16a789aaa1 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Initializer.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Initializer.cs @@ -35,13 +35,13 @@ public interface IInitializer : IJVMBridgeBase } /// - /// Listener for Kafka Initializer. Extends , implements + /// Listener for Kafka Initializer. Extends , implements /// /// The Initialized data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class Initializer : CLRListener, IInitializer + public class Initializer : JVMBridgeListener, IInitializer { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.InitializerImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Joined.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Joined.cs index de4fdb4fb8..21d0c40547 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Joined.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Joined.cs @@ -17,7 +17,6 @@ */ using MASES.JCOBridge.C2JBridge; -using MASES.JCOBridge.C2JBridge.Function; using MASES.KafkaBridge.Common.Serialization; namespace MASES.KafkaBridge.Streams.KStream diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KStream.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KStream.cs index 2a33d5b151..1371a9500a 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KStream.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KStream.cs @@ -18,7 +18,7 @@ using MASES.JCOBridge.C2JBridge; using MASES.KafkaBridge.Common.Utils; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Streams.Processor; using MASES.KafkaBridge.Streams.State; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KTable.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KTable.cs index d58abce551..637082f6df 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KTable.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KTable.cs @@ -17,7 +17,7 @@ */ using MASES.JCOBridge.C2JBridge; -using MASES.JCOBridge.C2JBridge.Function; +using Java.Util.Function; using MASES.KafkaBridge.Common.Utils; using MASES.KafkaBridge.Streams.State; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KeyValueMapper.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KeyValueMapper.cs index f2c37137fb..49ac38628f 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KeyValueMapper.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/KeyValueMapper.cs @@ -39,15 +39,15 @@ public interface IKeyValueMapper : IJVMBridgeBase } /// - /// Listener for Kafka KeyValueMapper. Extends , implements + /// Listener for Kafka KeyValueMapper. Extends , implements /// /// The data associated to the event /// The data associated to the event /// The result value /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class KeyValueMapper : CLRListener, IKeyValueMapper + public class KeyValueMapper : JVMBridgeListener, IKeyValueMapper { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.KeyValueMapperImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Merger.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Merger.cs index 2b89b986c9..29d9d9c00d 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Merger.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Merger.cs @@ -38,14 +38,14 @@ public interface IMerger : IJVMBridgeBase V Apply(K aggKey, V aggOne, V aggTwo); } /// - /// Listener for Kafka Merger. Extends + /// Listener for Kafka Merger. Extends /// /// The data associated to the event /// The data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class Merger : CLRListener, IMerger + public class Merger : JVMBridgeListener, IMerger { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.MergerImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Predicate.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Predicate.cs index ff8bf48d22..f65fdec667 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Predicate.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Predicate.cs @@ -38,14 +38,14 @@ public interface IPredicate : IJVMBridgeBase } /// - /// Listener for Kafka Predicate. Extends , implements + /// Listener for Kafka Predicate. Extends , implements /// /// The data associated to the event /// The data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class Predicate : CLRListener, IPredicate + public class Predicate : JVMBridgeListener, IPredicate { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.PredicateImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Reducer.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Reducer.cs index 8887fa7cac..4a67a6c993 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Reducer.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/Reducer.cs @@ -37,13 +37,13 @@ public interface IReducer : IJVMBridgeBase } /// - /// Listener for Kafka Reducer. Extends , implements + /// Listener for Kafka Reducer. Extends , implements /// /// The data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class Reducer : CLRListener, IReducer + public class Reducer : JVMBridgeListener, IReducer { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.ReducerImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/TableJoined.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/TableJoined.cs index d3099f1f3f..ef31d8af15 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/TableJoined.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/TableJoined.cs @@ -17,7 +17,7 @@ */ using MASES.JCOBridge.C2JBridge; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Streams.Processor; namespace MASES.KafkaBridge.Streams.KStream diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/TransformerSupplier.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/TransformerSupplier.cs index 817aa51e6c..5b27d10fd0 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/TransformerSupplier.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/TransformerSupplier.cs @@ -17,7 +17,7 @@ */ using MASES.JCOBridge.C2JBridge; -using MASES.JCOBridge.C2JBridge.Function; +using Java.Util.Function; using MASES.JCOBridge.C2JBridge.JVMInterop; using MASES.KafkaBridge.Java.Util; using MASES.KafkaBridge.Streams.Processor; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueJoiner.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueJoiner.cs index f23a028344..7ddd58140b 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueJoiner.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueJoiner.cs @@ -39,15 +39,15 @@ public interface IValueJoiner : IJVMBridgeBase } /// - /// Listener for Kafka ValueJoiner. Extends , implements + /// Listener for Kafka ValueJoiner. Extends , implements /// /// The data associated to the event /// The data associated to the event /// Aggregated value /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class ValueJoiner : CLRListener, IValueJoiner + public class ValueJoiner : JVMBridgeListener, IValueJoiner { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.ValueJoinerImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueJoinerWithKey.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueJoinerWithKey.cs index 18ccd70339..832ab2be22 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueJoinerWithKey.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueJoinerWithKey.cs @@ -41,16 +41,16 @@ public interface IValueJoinerWithKey : IJVMBridgeBase } /// - /// Listener for Kafka ValueJoinerWithKey. Extends , implements + /// Listener for Kafka ValueJoinerWithKey. Extends , implements /// /// The data associated to the event /// The data associated to the event /// The data associated to the event /// Joined value /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class ValueJoinerWithKey : CLRListener, IValueJoinerWithKey + public class ValueJoinerWithKey : JVMBridgeListener, IValueJoinerWithKey { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.ValueJoinerWithKeyImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueMapper.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueMapper.cs index 0c55cb6368..d31b9c3d1b 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueMapper.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueMapper.cs @@ -36,14 +36,14 @@ public interface IValueMapper : IJVMBridgeBase VR Apply(V o1); } /// - /// Listener for Kafka ValueMapper. Extends , implements + /// Listener for Kafka ValueMapper. Extends , implements /// /// The data associated to the event /// The result data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class ValueMapper : CLRListener, IValueMapper + public class ValueMapper : JVMBridgeListener, IValueMapper { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.ValueMapperImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueMapperWithKey.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueMapperWithKey.cs index afc778b996..e6ffb5e6b4 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueMapperWithKey.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueMapperWithKey.cs @@ -39,15 +39,15 @@ public interface IValueMapperWithKey : IJVMBridgeBase } /// - /// Listener for Kafka ValueMapperWithKey. Extends , implements + /// Listener for Kafka ValueMapperWithKey. Extends , implements /// /// The key data associated to the event /// The value data associated to the event /// The result data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class ValueMapperWithKey : CLRListener, IValueMapperWithKey + public class ValueMapperWithKey : JVMBridgeListener, IValueMapperWithKey { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.ValueMapperWithKeyImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueTransformerWithKeySupplier.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueTransformerWithKeySupplier.cs index ddda58402e..d573942a8d 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueTransformerWithKeySupplier.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/ValueTransformerWithKeySupplier.cs @@ -17,7 +17,7 @@ */ using MASES.JCOBridge.C2JBridge; -using MASES.JCOBridge.C2JBridge.Function; +using Java.Util.Function; using MASES.JCOBridge.C2JBridge.JVMInterop; using MASES.KafkaBridge.Streams.Processor; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/WindowedSerdes.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/WindowedSerdes.cs index 3c49d34d84..794b65c92d 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/WindowedSerdes.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KStream/WindowedSerdes.cs @@ -18,7 +18,7 @@ using MASES.JCOBridge.C2JBridge; using MASES.KafkaBridge.Common.Serialization; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; namespace MASES.KafkaBridge.Streams.KStream { @@ -29,12 +29,12 @@ public class WindowedSerdes : JVMBridgeBase public static Serde> TimeWindowedSerdeFrom(Class type, long windowSize) where T : IJVMBridgeBase, new() { - return SExecute>>("timeWindowedSerdeFrom", type.JVMType, windowSize); + return SExecute>>("timeWindowedSerdeFrom", type, windowSize); } public static Serde> SessionWindowedSerdeFrom(Class type) where T : IJVMBridgeBase, new() { - return SExecute>>("sessionWindowedSerdeFrom", type.JVMType); + return SExecute>>("sessionWindowedSerdeFrom", type); } } } diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KafkaClientSupplier.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KafkaClientSupplier.cs index e8da2ac45c..c198d7a8ad 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KafkaClientSupplier.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KafkaClientSupplier.cs @@ -41,12 +41,12 @@ public interface IKafkaClientSupplier : IJVMBridgeBase } /// - /// Listener for Kafka KafkaClientSupplier. Extends , implements + /// Listener for Kafka KafkaClientSupplier. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class KafkaClientSupplier : CLRListener, IKafkaClientSupplier + public class KafkaClientSupplier : JVMBridgeListener, IKafkaClientSupplier { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.KafkaClientSupplierImpl"; readonly Func, Clients.Admin.IAdmin> GetAdminFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KafkaStreams.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KafkaStreams.cs index 44dabf927a..8d28323fe8 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KafkaStreams.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KafkaStreams.cs @@ -46,12 +46,12 @@ public interface IStateListener : IJVMBridgeBase } /// - /// Listener for Kafka StateListener. Extends , implements + /// Listener for Kafka StateListener. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class StateListener : CLRListener, IStateListener + public class StateListener : JVMBridgeListener, IStateListener { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.StateListenerImpl"; readonly Action executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KeyValue.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KeyValue.cs index d9689ff120..129a8e4960 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KeyValue.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/KeyValue.cs @@ -34,5 +34,9 @@ public KeyValue() { } public KeyValue(K key, V value) : base(key, value) { } + + public K Key => Instance.GetField("key"); + + public V Value => Instance.GetField("value"); } } diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Api/Processor.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Api/Processor.cs index a80181dd0a..a6af5c4c59 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Api/Processor.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Api/Processor.cs @@ -30,9 +30,9 @@ public interface IProcessor : IJVMBridgeBase void Close(); } - public class Processor : CLRListener, IProcessor + public class Processor : JVMBridgeListener, IProcessor { - /// + /// public sealed override string ClassName => "org.apache.kafka.streams.processor.api.ProcessorImpl"; readonly Action> executionFunctionInit = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Api/ProcessorSupplier.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Api/ProcessorSupplier.cs index 3f2a640798..3d57b02f03 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Api/ProcessorSupplier.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Api/ProcessorSupplier.cs @@ -16,7 +16,7 @@ * Refer to LICENSE for more information. */ -using MASES.JCOBridge.C2JBridge.Function; +using Java.Util.Function; using MASES.KafkaBridge.Java.Util; using MASES.KafkaBridge.Streams.State; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Processor.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Processor.cs index 47245bf251..35c7966714 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Processor.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/Processor.cs @@ -30,9 +30,9 @@ public interface IProcessor : IJVMBridgeBase void Close(); } - public class Processor : CLRListener, IProcessor + public class Processor : JVMBridgeListener, IProcessor { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.processor.ProcessorImpl"; readonly Action executionFunctionInit = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/ProcessorSupplier.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/ProcessorSupplier.cs index 4b94fa050f..f5157f71df 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/ProcessorSupplier.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/ProcessorSupplier.cs @@ -16,7 +16,7 @@ * Refer to LICENSE for more information. */ -using MASES.JCOBridge.C2JBridge.Function; +using Java.Util.Function; using MASES.KafkaBridge.Java.Util; using MASES.KafkaBridge.Streams.State; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StateRestoreCallback.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StateRestoreCallback.cs index e77737e0d4..8ad2f3fa4a 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StateRestoreCallback.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StateRestoreCallback.cs @@ -36,12 +36,12 @@ public interface IStateRestoreCallback : IJVMBridgeBase } /// - /// Listener for Kafka StateRestoreCallback. Extends , implements + /// Listener for Kafka StateRestoreCallback. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class StateRestoreCallback : CLRListener, IStateRestoreCallback + public class StateRestoreCallback : JVMBridgeListener, IStateRestoreCallback { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.processor.StateRestoreCallbackImpl"; readonly Action executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StateRestoreListener.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StateRestoreListener.cs index aa4ee5a99a..d73d1308bc 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StateRestoreListener.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StateRestoreListener.cs @@ -44,12 +44,12 @@ void OnRestoreEnd(TopicPartition topicPartition, } /// - /// Listener for Kafka StateRestoreListener. Extends , implements + /// Listener for Kafka StateRestoreListener. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class StateRestoreListener : CLRListener, IStateRestoreListener + public class StateRestoreListener : JVMBridgeListener, IStateRestoreListener { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.processor.StateRestoreListenerImpl"; readonly Action OnRestoreStartFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StreamPartitioner.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StreamPartitioner.cs index c58e865b1c..0ad714c0e4 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StreamPartitioner.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/StreamPartitioner.cs @@ -40,14 +40,14 @@ public interface IStreamPartitioner : IJVMBridgeBase } /// - /// Listener for Kafka StreamPartitioner. Extends , implements + /// Listener for Kafka StreamPartitioner. Extends , implements /// /// The data associated to the event /// The data associated to the event /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class StreamPartitioner : CLRListener, IStreamPartitioner + public class StreamPartitioner : JVMBridgeListener, IStreamPartitioner { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.kstream.StreamPartitionerImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/TimestampExtractor.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/TimestampExtractor.cs index 1d9e2f75a9..5555c9031d 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/TimestampExtractor.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/TimestampExtractor.cs @@ -37,12 +37,12 @@ public interface ITimestampExtractor : IJVMBridgeBase } /// - /// Listener for Kafka TimestampExtractor. Extends , implements + /// Listener for Kafka TimestampExtractor. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class TimestampExtractor : CLRListener, ITimestampExtractor + public class TimestampExtractor : JVMBridgeListener, ITimestampExtractor { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.processor.TimestampExtractorImpl"; readonly Func, long, long> executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/TopicNameExtractor.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/TopicNameExtractor.cs index 2a07f5fe54..da5b2a9eb4 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/TopicNameExtractor.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Processor/TopicNameExtractor.cs @@ -44,12 +44,12 @@ public interface ITopicNameExtractor : ITopicNameExtractor } /// - /// Listener for Kafka TopicNameExtractor. Extends , implements + /// Listener for Kafka TopicNameExtractor. Extends , implements /// /// Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object - public class TopicNameExtractor : CLRListener, ITopicNameExtractor + public class TopicNameExtractor : JVMBridgeListener, ITopicNameExtractor { - /// + /// public sealed override string ClassName => "org.mases.kafkabridge.streams.processor.TopicNameExtractorImpl"; readonly Func executionFunction = null; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/State/KeyValueIterator.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/State/KeyValueIterator.cs index da51185a47..c92e1a352c 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/State/KeyValueIterator.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/State/KeyValueIterator.cs @@ -18,6 +18,7 @@ using MASES.JCOBridge.C2JBridge; using MASES.KafkaBridge.Java.Util; +using System.Collections.Generic; namespace MASES.KafkaBridge.Streams.State { @@ -25,6 +26,11 @@ public class KeyValueIterator : JVMBridgeBaseEnumerable "org.apache.kafka.streams.state.KeyValueIterator"; + public override IEnumerator> GetEnumerator() + { + return new JVMBridgeBaseEnumerator>(Instance); + } + public static implicit operator Iterator>(KeyValueIterator keyValueIterator) { return Wraps>>(keyValueIterator.Instance); } public virtual K PeekNextKey => IExecute("peekNextKey"); diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/StreamsBuilder.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/StreamsBuilder.cs index 83be06fa4b..ec2c6c91a0 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/StreamsBuilder.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/StreamsBuilder.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common.Utils; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util; using MASES.KafkaBridge.Java.Util.Regex; using MASES.KafkaBridge.Streams.KStream; diff --git a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Topology.cs b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Topology.cs index b5b6082b22..85e5e3330c 100644 --- a/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Topology.cs +++ b/src/net/KafkaBridge/ClientSide/BridgedClasses/Streams/Topology.cs @@ -17,7 +17,7 @@ */ using MASES.KafkaBridge.Common.Serialization; -using MASES.KafkaBridge.Java.Lang; +using Java.Lang; using MASES.KafkaBridge.Java.Util.Regex; using MASES.KafkaBridge.Streams.Processor; using MASES.KafkaBridge.Streams.State; diff --git a/src/net/KafkaBridge/GenericConfigBuilder.cs b/src/net/KafkaBridge/GenericConfigBuilder.cs index b888e8c3c3..a4e9b61e64 100644 --- a/src/net/KafkaBridge/GenericConfigBuilder.cs +++ b/src/net/KafkaBridge/GenericConfigBuilder.cs @@ -32,6 +32,20 @@ public class GenericConfigBuilder : System.ComponentModel.INotifyPropertyChan /// /// The instance of public static T Create() { return new T(); } + /// + /// Creates an instance of + /// + /// Clone from this original instance + /// The instance of clone from or new instance if is + public static T CreateFrom(T origin) + { + if (origin == null) return Create(); + var newT = new T + { + _options = new System.Collections.Generic.Dictionary(origin._options) + }; + return newT; + } public static implicit operator Properties(GenericConfigBuilder clazz) { return clazz.ToProperties(); } diff --git a/src/net/KafkaBridge/KafkaBridge.csproj b/src/net/KafkaBridge/KafkaBridge.csproj index 9384ceb1f5..6c2660ed9d 100644 --- a/src/net/KafkaBridge/KafkaBridge.csproj +++ b/src/net/KafkaBridge/KafkaBridge.csproj @@ -9,7 +9,7 @@ MASES s.r.l. MASES s.r.l. MASES s.r.l. - 1.1.8.0 + 1.1.9.0 KafkaBridge true net461;netcoreapp3.1;net5.0;net6.0 @@ -19,7 +19,7 @@ https://github.com/masesgroup/KafkaBridge/ https://github.com/masesgroup/KafkaBridge https://github.com/masesgroup/KafkaBridge/releases - LICENSE + LICENSE JCOB128x128.png kafka apache-kafka dotnet clr netcore net5 net6 kafka connect streams producer consumer providers streamprovider confluent MASES.KafkaBridge @@ -51,17 +51,14 @@ - + - - - All - None - + + + All + None + - - - diff --git a/src/net/KafkaBridge/KafkaBridgeCore.cs b/src/net/KafkaBridge/KafkaBridgeCore.cs index 680d37f898..335874b510 100644 --- a/src/net/KafkaBridge/KafkaBridgeCore.cs +++ b/src/net/KafkaBridge/KafkaBridgeCore.cs @@ -573,27 +573,27 @@ string buildClassPath() } classPath = string.Empty; - buildClassPath(RootPath, "*.jar"); - buildClassPath(CoreDependenciesPath); - buildClassPath(ExamplesPath); - buildClassPath(ClientsPath); - buildClassPath(StreamsPath); - buildClassPath(StreamsExamplePath); - buildClassPath(StreamsDependenciesPath); - buildClassPath(ToolsPath); - buildClassPath(ToolsDependenciesPath); - buildClassPath(ConnectApiPath); - buildClassPath(ConnectApiDependenciesPath); - buildClassPath(ConnectRuntimePath); - buildClassPath(ConnectRuntimeDependenciesPath); - buildClassPath(ConnectFilePath); - buildClassPath(ConnectFileDependenciesPath); - buildClassPath(ConnectJsonPath); - buildClassPath(ConnectJsonDependenciesPath); - buildClassPath(ConnectToolsPath); - buildClassPath(ConnectToolsDependenciesPath); - buildClassPath(ReleasePath); - buildClassPath(ReleaseAdditionalPath); + BuildClassPath(RootPath, "*.jar"); + BuildClassPath(CoreDependenciesPath); + BuildClassPath(ExamplesPath); + BuildClassPath(ClientsPath); + BuildClassPath(StreamsPath); + BuildClassPath(StreamsExamplePath); + BuildClassPath(StreamsDependenciesPath); + BuildClassPath(ToolsPath); + BuildClassPath(ToolsDependenciesPath); + BuildClassPath(ConnectApiPath); + BuildClassPath(ConnectApiDependenciesPath); + BuildClassPath(ConnectRuntimePath); + BuildClassPath(ConnectRuntimeDependenciesPath); + BuildClassPath(ConnectFilePath); + BuildClassPath(ConnectFileDependenciesPath); + BuildClassPath(ConnectJsonPath); + BuildClassPath(ConnectJsonDependenciesPath); + BuildClassPath(ConnectToolsPath); + BuildClassPath(ConnectToolsDependenciesPath); + BuildClassPath(ReleasePath); + BuildClassPath(ReleaseAdditionalPath); classPath += !string.IsNullOrEmpty(ExtraClassPath) ? InternalConst.PathSeparator + ExtraClassPath : string.Empty; @@ -608,7 +608,7 @@ string buildClassPath() return classPath; } - string buildClassPath(string path, string pattern = null) + string BuildClassPath(string path, string pattern = null) { var folder = Path.GetDirectoryName(path); if (pattern == null) pattern = Path.GetFileName(path); diff --git a/src/net/KafkaBridgeCLI/KafkaBridgeCLI.csproj b/src/net/KafkaBridgeCLI/KafkaBridgeCLI.csproj index c21f22d4eb..733c0b54e1 100644 --- a/src/net/KafkaBridgeCLI/KafkaBridgeCLI.csproj +++ b/src/net/KafkaBridgeCLI/KafkaBridgeCLI.csproj @@ -10,7 +10,7 @@ MASES s.r.l. MASES s.r.l. MASES s.r.l. - 1.1.8.0 + 1.1.9.0 KafkaBridgeCLI true net461;netcoreapp3.1;net5.0;net6.0 @@ -20,7 +20,7 @@ https://github.com/masesgroup/KafkaBridge/ https://github.com/masesgroup/KafkaBridge https://github.com/masesgroup/KafkaBridge/releases - LICENSE + LICENSE JCOB128x128.png kafkabridge cli kafka apache-kafka dotnet clr netcore net5 net6 kafka connect streams producer consumer providers streamprovider confluent MASES.KafkaBridgeCLI diff --git a/src/net/KafkaBridgeCLI/KafkaBridgeCLI.nuspec b/src/net/KafkaBridgeCLI/KafkaBridgeCLI.nuspec index 7d86920824..800246a672 100644 --- a/src/net/KafkaBridgeCLI/KafkaBridgeCLI.nuspec +++ b/src/net/KafkaBridgeCLI/KafkaBridgeCLI.nuspec @@ -2,7 +2,7 @@ MASES.KafkaBridgeCLI - 1.1.8 + 1.1.9 KafkaBridgeCLI - CLI interface of KafkaBridge MASES s.r.l. MASES s.r.l. diff --git a/src/net/templates/templatepack.csproj b/src/net/templates/templatepack.csproj index 9f9ae9b5f5..e8b741efa2 100644 --- a/src/net/templates/templatepack.csproj +++ b/src/net/templates/templatepack.csproj @@ -1,7 +1,7 @@ Template - 1.1.8.0 + 1.1.9.0 MASES.KafkaBridge.Templates KafkaBridge Templates - Templates to use the KafkaBridge MASES s.r.l. @@ -17,7 +17,7 @@ https://github.com/masesgroup/KafkaBridge/ https://github.com/masesgroup/KafkaBridge https://github.com/masesgroup/KafkaBridge/releases - LICENSE + LICENSE JCOB128x128.png kafka apache-kafka dotnet clr netcore net5 net6 template kafka connect streams producer consumer providers streamprovider confluent 8.0 diff --git a/src/net/templates/templates/kafkabridgeConsumerApp/kafkabridgeConsumerApp.csproj b/src/net/templates/templates/kafkabridgeConsumerApp/kafkabridgeConsumerApp.csproj index b4438ce7f4..30ffd10929 100644 --- a/src/net/templates/templates/kafkabridgeConsumerApp/kafkabridgeConsumerApp.csproj +++ b/src/net/templates/templates/kafkabridgeConsumerApp/kafkabridgeConsumerApp.csproj @@ -12,6 +12,6 @@ - + diff --git a/src/net/templates/templates/kafkabridgePipeStreamApp/kafkabridgePipeStreamApp.csproj b/src/net/templates/templates/kafkabridgePipeStreamApp/kafkabridgePipeStreamApp.csproj index b4438ce7f4..30ffd10929 100644 --- a/src/net/templates/templates/kafkabridgePipeStreamApp/kafkabridgePipeStreamApp.csproj +++ b/src/net/templates/templates/kafkabridgePipeStreamApp/kafkabridgePipeStreamApp.csproj @@ -12,6 +12,6 @@ - + diff --git a/src/net/templates/templates/kafkabridgeProducerApp/kafkabridgeProducerApp.csproj b/src/net/templates/templates/kafkabridgeProducerApp/kafkabridgeProducerApp.csproj index b4438ce7f4..30ffd10929 100644 --- a/src/net/templates/templates/kafkabridgeProducerApp/kafkabridgeProducerApp.csproj +++ b/src/net/templates/templates/kafkabridgeProducerApp/kafkabridgeProducerApp.csproj @@ -12,6 +12,6 @@ - + diff --git a/tests/KafkaBridgeTest/KafkaBridgeTest.csproj b/tests/KafkaBridgeTest/KafkaBridgeTest.csproj index 8aa38dde72..ef26aa0ccc 100644 --- a/tests/KafkaBridgeTest/KafkaBridgeTest.csproj +++ b/tests/KafkaBridgeTest/KafkaBridgeTest.csproj @@ -8,7 +8,7 @@ Copyright © MASES s.r.l. 2022 MASES s.r.l. MASES s.r.l. - 1.1.8.0 + 1.1.9.0 net461;netcoreapp3.1;net5.0;net6.0 ..\..\bin\ latest diff --git a/tests/KafkaBridgeTestAdmin/KafkaBridgeTestAdmin.csproj b/tests/KafkaBridgeTestAdmin/KafkaBridgeTestAdmin.csproj index 02d93b00aa..74f80c88d4 100644 --- a/tests/KafkaBridgeTestAdmin/KafkaBridgeTestAdmin.csproj +++ b/tests/KafkaBridgeTestAdmin/KafkaBridgeTestAdmin.csproj @@ -8,7 +8,7 @@ Copyright © MASES s.r.l. 2022 MASES s.r.l. MASES s.r.l. - 1.1.8.0 + 1.1.9.0 net461;netcoreapp3.1;net5.0;net6.0 ..\..\bin\ latest diff --git a/tests/KafkaBridgeTestStreams/KafkaBridgeTestStreams.csproj b/tests/KafkaBridgeTestStreams/KafkaBridgeTestStreams.csproj index 3a6867d9c6..8aa329b907 100644 --- a/tests/KafkaBridgeTestStreams/KafkaBridgeTestStreams.csproj +++ b/tests/KafkaBridgeTestStreams/KafkaBridgeTestStreams.csproj @@ -8,7 +8,7 @@ Copyright © MASES s.r.l. 2022 MASES s.r.l. MASES s.r.l. - 1.1.8.0 + 1.1.9.0 net461;netcoreapp3.1;net5.0;net6.0 ..\..\bin\ latest diff --git a/tests/KafkaBridgeTestStreams/Program.cs b/tests/KafkaBridgeTestStreams/Program.cs index 4067fd9e30..0c2cd44462 100644 --- a/tests/KafkaBridgeTestStreams/Program.cs +++ b/tests/KafkaBridgeTestStreams/Program.cs @@ -26,7 +26,6 @@ using MASES.KafkaBridge; using MASES.KafkaBridge.Clients.Consumer; using MASES.KafkaBridge.Common.Serialization; -using MASES.KafkaBridge.Java.Lang; using MASES.KafkaBridge.Java.Util; using MASES.KafkaBridge.Streams; using MASES.KafkaBridge.Streams.Errors; @@ -62,7 +61,7 @@ static void Main(string[] args) } //Thread threadConsume = new Thread(PipeDemo) - Thread threadConsume = new Thread(WordCountDemo) + Thread threadConsume = new(WordCountDemo) { Name = "DemoThread" }; @@ -126,7 +125,7 @@ static void WordCountDemo() // setting offset reset to earliest so that we can re-run the demo code with the same pre-loaded data props.Put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); - ValueMapper> valueMapper = null; + ValueMapper> valueMapper = null; KeyValueMapper keyValuemapper = null; StreamsUncaughtExceptionHandler errorHandler = null; @@ -136,11 +135,11 @@ static void WordCountDemo() KStream source = builder.Stream(topicToUse); - valueMapper = new ValueMapper>((value) => + valueMapper = new ValueMapper>((value) => { - Regex regex = new Regex("\\W+"); + Regex regex = new("\\W+"); - ArrayList arrayList = new ArrayList(); + ArrayList arrayList = new(); foreach (var item in regex.Split(value)) {