diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/function/SDK/SDKManager.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/function/SDK/SDKManager.java index 74ddd475..a84274b4 100644 --- a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/function/SDK/SDKManager.java +++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/function/SDK/SDKManager.java @@ -26,6 +26,14 @@ import org.apache.eventmesh.dashboard.core.function.SDK.operation.RocketMQProduceSDKOperation; import org.apache.eventmesh.dashboard.core.function.SDK.operation.RocketMQPushConsumerSDKOperation; import org.apache.eventmesh.dashboard.core.function.SDK.operation.RocketMQRemotingSDKOperation; +import org.apache.eventmesh.dashboard.core.function.SDK.operation.RuntimeGrpcConsumerSDKOperation; +import org.apache.eventmesh.dashboard.core.function.SDK.operation.RuntimeGrpcProducerSDKOperation; +import org.apache.eventmesh.dashboard.core.function.SDK.operation.RuntimeHttpConsumerSDKOperation; +import org.apache.eventmesh.dashboard.core.function.SDK.operation.RuntimeHttpProducerSDKOperation; +import org.apache.eventmesh.dashboard.core.function.SDK.operation.RuntimeSDKOperation; +import org.apache.eventmesh.dashboard.core.function.SDK.operation.RuntimeTcpCloudEventSDKOperation; +import org.apache.eventmesh.dashboard.core.function.SDK.operation.RuntimeTcpEventMeshSDKOperation; +import org.apache.eventmesh.dashboard.core.function.SDK.operation.RuntimeTcpOpenMessageSDKOperation; import java.util.AbstractMap.SimpleEntry; import java.util.Map; @@ -73,6 +81,17 @@ public static SDKManager getInstance() { clientCreateOperationMap.put(SDKTypeEnum.META_ETCD, new EtcdSDKOperation()); + clientCreateOperationMap.put(SDKTypeEnum.RUNTIME_EVENTMESH_CLIENT, new RuntimeSDKOperation()); + + clientCreateOperationMap.put(SDKTypeEnum.RUNTIME_TCP_CLOUDEVENT_CLIENT, new RuntimeTcpCloudEventSDKOperation()); + clientCreateOperationMap.put(SDKTypeEnum.RUNTIME_TCP_EVENTMESH_CLIENT, new RuntimeTcpEventMeshSDKOperation()); + clientCreateOperationMap.put(SDKTypeEnum.RUNTIME_TCP_OPENMESSAGE_CLIENT, new RuntimeTcpOpenMessageSDKOperation()); + + clientCreateOperationMap.put(SDKTypeEnum.RUNTIME_HTTP_PRODUCER, new RuntimeHttpProducerSDKOperation()); + clientCreateOperationMap.put(SDKTypeEnum.RUNTIME_HTTP_CONSUMER, new RuntimeHttpConsumerSDKOperation()); + + clientCreateOperationMap.put(SDKTypeEnum.RUNTIME_GRPC_PRODUCER, new RuntimeGrpcProducerSDKOperation()); + clientCreateOperationMap.put(SDKTypeEnum.RUNTIME_GRPC_CONSUMER, new RuntimeGrpcConsumerSDKOperation()); } private SDKManager() { diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/function/SDK/SDKTypeEnum.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/function/SDK/SDKTypeEnum.java index c6524c8e..b10cde9f 100644 --- a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/function/SDK/SDKTypeEnum.java +++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/function/SDK/SDKTypeEnum.java @@ -35,4 +35,16 @@ public enum SDKTypeEnum { META_NACOS_NAMING, META_ETCD, + + RUNTIME_EVENTMESH_CLIENT, + + RUNTIME_TCP_CLOUDEVENT_CLIENT, + RUNTIME_TCP_EVENTMESH_CLIENT, + RUNTIME_TCP_OPENMESSAGE_CLIENT, + + RUNTIME_HTTP_PRODUCER, + RUNTIME_HTTP_CONSUMER, + + RUNTIME_GRPC_PRODUCER, + RUNTIME_GRPC_CONSUMER, } diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeGrpcConsumerSDKOperationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeGrpcConsumerSDKOperationTest.java index 0c7141ac..ff58b0a5 100644 --- a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeGrpcConsumerSDKOperationTest.java +++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeGrpcConsumerSDKOperationTest.java @@ -1,9 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package org.apache.eventmesh.dashboard.core.function.SDK.operation; import org.apache.eventmesh.client.grpc.consumer.EventMeshGrpcConsumer; import org.apache.eventmesh.dashboard.core.function.SDK.config.CreateRuntimeConfig; -import java.util.AbstractMap; +import java.util.AbstractMap.SimpleEntry; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -21,7 +38,7 @@ void testCreateClient() { .idc("idc") .sys("1234") .build(); - final AbstractMap.SimpleEntry grpcConsumerSimpleEntry = + final SimpleEntry grpcConsumerSimpleEntry = grpcConsumerSDKOperation.createClient(runtimeConfig); Assertions.assertEquals("127.0.0.1:10205", grpcConsumerSimpleEntry.getKey()); } diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeGrpcProducerSDKOperationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeGrpcProducerSDKOperationTest.java index 6f655db1..0d3db925 100644 --- a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeGrpcProducerSDKOperationTest.java +++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeGrpcProducerSDKOperationTest.java @@ -1,9 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package org.apache.eventmesh.dashboard.core.function.SDK.operation; import org.apache.eventmesh.client.grpc.producer.EventMeshGrpcProducer; import org.apache.eventmesh.dashboard.core.function.SDK.config.CreateRuntimeConfig; -import java.util.AbstractMap; +import java.util.AbstractMap.SimpleEntry; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -21,7 +38,7 @@ void testCreateClient() { .idc("idc") .sys("1234") .build(); - final AbstractMap.SimpleEntry grpcProducerSimpleEntry = + final SimpleEntry grpcProducerSimpleEntry = grpcProducerSDKOperation.createClient(runtimeConfig); Assertions.assertEquals("127.0.0.1:10205", grpcProducerSimpleEntry.getKey()); } diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeHttpConsumerSDKOperationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeHttpConsumerSDKOperationTest.java index 4c3eb530..17f2ddde 100644 --- a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeHttpConsumerSDKOperationTest.java +++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeHttpConsumerSDKOperationTest.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package org.apache.eventmesh.dashboard.core.function.SDK.operation; import org.apache.eventmesh.client.http.consumer.EventMeshHttpConsumer; @@ -5,7 +22,7 @@ import org.apache.eventmesh.common.utils.ThreadUtils; import org.apache.eventmesh.dashboard.core.function.SDK.config.CreateRuntimeConfig; -import java.util.AbstractMap; +import java.util.AbstractMap.SimpleEntry; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -27,7 +44,7 @@ void testCreateClient() { .username("eventmesh") .password("123456") .build(); - final AbstractMap.SimpleEntry httpConsumerSimpleEntry = + final SimpleEntry httpConsumerSimpleEntry = httpConsumerSDKOperation.createClient(runtimeConfig); Assertions.assertEquals("127.0.0.1:10105", httpConsumerSimpleEntry.getKey()); } diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeHttpProducerSDKOperationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeHttpProducerSDKOperationTest.java index 08ad3f67..07d16408 100644 --- a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeHttpProducerSDKOperationTest.java +++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeHttpProducerSDKOperationTest.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package org.apache.eventmesh.dashboard.core.function.SDK.operation; import org.apache.eventmesh.client.http.producer.EventMeshHttpProducer; @@ -5,7 +22,7 @@ import org.apache.eventmesh.common.utils.ThreadUtils; import org.apache.eventmesh.dashboard.core.function.SDK.config.CreateRuntimeConfig; -import java.util.AbstractMap; +import java.util.AbstractMap.SimpleEntry; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -27,7 +44,7 @@ void testCreateClient() { .username("eventmesh") .password("123456") .build(); - final AbstractMap.SimpleEntry httpProducerSimpleEntry = + final SimpleEntry httpProducerSimpleEntry = httpProducerSDKOperation.createClient(runtimeConfig); Assertions.assertEquals("127.0.0.1:10105", httpProducerSimpleEntry.getKey()); } diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeSDKOperationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeSDKOperationTest.java index 04b0b8e8..f496382b 100644 --- a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeSDKOperationTest.java +++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeSDKOperationTest.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package org.apache.eventmesh.dashboard.core.function.SDK.operation; import org.apache.eventmesh.client.tcp.common.EventMeshCommon; @@ -6,7 +23,7 @@ import org.apache.eventmesh.dashboard.core.function.SDK.config.CreateRuntimeConfig; import org.apache.eventmesh.dashboard.core.function.SDK.wrapper.RuntimeSDKWrapper; -import java.util.AbstractMap; +import java.util.AbstractMap.SimpleEntry; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -37,7 +54,7 @@ void testCreateClient() { .protocolName(Constants.EM_MESSAGE_PROTOCOL_NAME) .userAgent(userAgent) .build(); - final AbstractMap.SimpleEntry sdkWrapperSimpleEntry = + final SimpleEntry sdkWrapperSimpleEntry = runtimeSDKOperation.createClient(runtimeConfig); Assertions.assertEquals("127.0.0.1:10000", sdkWrapperSimpleEntry.getKey()); Assertions.assertNotNull(sdkWrapperSimpleEntry.getValue().getTcpEventMeshClient()); diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpCloudEventSDKOperationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpCloudEventSDKOperationTest.java index 68963f7f..26ed222e 100644 --- a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpCloudEventSDKOperationTest.java +++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpCloudEventSDKOperationTest.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package org.apache.eventmesh.dashboard.core.function.SDK.operation; import org.apache.eventmesh.client.tcp.common.EventMeshCommon; diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpEventMeshSDKOperationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpEventMeshSDKOperationTest.java index f9e972a0..ba6c3ea9 100644 --- a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpEventMeshSDKOperationTest.java +++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpEventMeshSDKOperationTest.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package org.apache.eventmesh.dashboard.core.function.SDK.operation; import org.apache.eventmesh.client.tcp.common.EventMeshCommon; diff --git a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpOpenMessageSDKOperationTest.java b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpOpenMessageSDKOperationTest.java index 6762c521..64300e04 100644 --- a/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpOpenMessageSDKOperationTest.java +++ b/eventmesh-dashboard-core/src/test/java/org/apache/eventmesh/dashboard/core/function/SDK/operation/RuntimeTcpOpenMessageSDKOperationTest.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package org.apache.eventmesh.dashboard.core.function.SDK.operation;