diff --git a/api/src/main/java/com/alibaba/nacos/api/config/remote/request/RequestRegistry.java b/api/src/main/java/com/alibaba/nacos/api/config/remote/request/RequestRegistry.java new file mode 100644 index 00000000000..830444a67e0 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/config/remote/request/RequestRegistry.java @@ -0,0 +1,49 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.api.config.remote.request; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * payload registry. + * + * @author shiyiyue + */ +public class RequestRegistry { + + private static Set> payloads = registryPayload(); + + private static Set> registryPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(AbstractConfigRequest.class); + payloads.add(ClientConfigMetricRequest.class); + payloads.add(ConfigBatchListenRequest.class); + payloads.add(ConfigChangeNotifyRequest.class); + payloads.add(ConfigPublishRequest.class); + payloads.add(ConfigQueryRequest.class); + payloads.add(ConfigRemoveRequest.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } + +} diff --git a/api/src/main/java/com/alibaba/nacos/api/config/remote/request/cluster/RequestRegistry.java b/api/src/main/java/com/alibaba/nacos/api/config/remote/request/cluster/RequestRegistry.java new file mode 100644 index 00000000000..c8fe7f3cd0a --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/config/remote/request/cluster/RequestRegistry.java @@ -0,0 +1,43 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.api.config.remote.request.cluster; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * payload registry. + * + * @author shiyiyue + */ +public class RequestRegistry { + + private static Set> payloads = registryPayload(); + + private static Set> registryPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(ConfigChangeClusterSyncRequest.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } + +} diff --git a/api/src/main/java/com/alibaba/nacos/api/config/remote/response/ResponseRegistry.java b/api/src/main/java/com/alibaba/nacos/api/config/remote/response/ResponseRegistry.java new file mode 100644 index 00000000000..f507b20f505 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/config/remote/response/ResponseRegistry.java @@ -0,0 +1,47 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.api.config.remote.response; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * payload registry. + * + * @author shiyiyue + */ +public class ResponseRegistry { + + private static Set> payloads = getPayload(); + + private static Set> getPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(ClientConfigMetricResponse.class); + payloads.add(ConfigChangeBatchListenResponse.class); + payloads.add(ConfigChangeNotifyResponse.class); + payloads.add(ConfigPublishResponse.class); + payloads.add(ConfigQueryResponse.class); + payloads.add(ConfigRemoveResponse.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } +} diff --git a/api/src/main/java/com/alibaba/nacos/api/config/remote/response/cluster/ResponseRegistry.java b/api/src/main/java/com/alibaba/nacos/api/config/remote/response/cluster/ResponseRegistry.java new file mode 100644 index 00000000000..571bdc4db95 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/config/remote/response/cluster/ResponseRegistry.java @@ -0,0 +1,42 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.api.config.remote.response.cluster; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * payload registry. + * + * @author shiyiyue + */ +public class ResponseRegistry { + + private static Set> payloads = getPayload(); + + private static Set> getPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(ConfigChangeClusterSyncResponse.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } +} diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/remote/request/RequestRegistry.java b/api/src/main/java/com/alibaba/nacos/api/naming/remote/request/RequestRegistry.java new file mode 100644 index 00000000000..768523e8478 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/naming/remote/request/RequestRegistry.java @@ -0,0 +1,49 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.api.naming.remote.request; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * payload registry. + * + * @author shiyiyue + */ +public class RequestRegistry { + + private static Set> payloads = registryPayload(); + + private static Set> registryPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(AbstractNamingRequest.class); + payloads.add(BatchInstanceRequest.class); + payloads.add(InstanceRequest.class); + payloads.add(NotifySubscriberRequest.class); + payloads.add(ServiceListRequest.class); + payloads.add(ServiceQueryRequest.class); + payloads.add(SubscribeServiceRequest.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } + +} diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/remote/response/ResponseRegistry.java b/api/src/main/java/com/alibaba/nacos/api/naming/remote/response/ResponseRegistry.java new file mode 100644 index 00000000000..e924f26ca78 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/naming/remote/response/ResponseRegistry.java @@ -0,0 +1,47 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.api.naming.remote.response; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * payload registry. + * + * @author shiyiyue + */ +public class ResponseRegistry { + + private static Set> payloads = getPayload(); + + private static final Set> getPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(BatchInstanceResponse.class); + payloads.add(InstanceResponse.class); + payloads.add(NotifySubscriberResponse.class); + payloads.add(QueryServiceResponse.class); + payloads.add(ServiceListResponse.class); + payloads.add(SubscribeServiceResponse.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } +} diff --git a/api/src/main/java/com/alibaba/nacos/api/remote/request/RequestRegistry.java b/api/src/main/java/com/alibaba/nacos/api/remote/request/RequestRegistry.java new file mode 100644 index 00000000000..1144531affe --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/remote/request/RequestRegistry.java @@ -0,0 +1,52 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.api.remote.request; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * request payload registry. + * @author shiyiyue + */ +public class RequestRegistry { + + private static Set> payloads = registryPayload(); + + private static Set> registryPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(InternalRequest.class); + payloads.add(Request.class); + payloads.add(ServerRequest.class); + payloads.add(ClientDetectionRequest.class); + payloads.add(ConnectionSetupRequest.class); + payloads.add(ConnectResetRequest.class); + payloads.add(HealthCheckRequest.class); + payloads.add(PushAckRequest.class); + payloads.add(ServerCheckRequest.class); + payloads.add(ServerLoaderInfoRequest.class); + payloads.add(ServerReloadRequest.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } + +} diff --git a/api/src/main/java/com/alibaba/nacos/api/remote/response/ResponseRegistry.java b/api/src/main/java/com/alibaba/nacos/api/remote/response/ResponseRegistry.java new file mode 100644 index 00000000000..dee528af9e3 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/remote/response/ResponseRegistry.java @@ -0,0 +1,49 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.api.remote.response; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * payload registry. + * + * @author shiyiyue + */ +public class ResponseRegistry { + + private static Set> payloads = getPayload(); + + private static Set> getPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(Response.class); + payloads.add(ClientDetectionResponse.class); + payloads.add(ConnectResetResponse.class); + payloads.add(ErrorResponse.class); + payloads.add(HealthCheckResponse.class); + payloads.add(ServerCheckResponse.class); + payloads.add(ServerLoaderInfoResponse.class); + payloads.add(ServerReloadResponse.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } +} diff --git a/client/src/main/java/com/alibaba/nacos/client/remote/ClientPayloadPackageProvider.java b/client/src/main/java/com/alibaba/nacos/client/remote/ClientPayloadPackageProvider.java deleted file mode 100644 index ef153062e54..00000000000 --- a/client/src/main/java/com/alibaba/nacos/client/remote/ClientPayloadPackageProvider.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 1999-2021 Alibaba Group Holding Ltd. - * - * 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. - */ - -package com.alibaba.nacos.client.remote; - -import com.alibaba.nacos.common.remote.PayloadPackageProvider; - -import java.util.HashSet; -import java.util.Set; - -/** - * client package provider. - * - * @author hujun - */ -public class ClientPayloadPackageProvider implements PayloadPackageProvider { - - private final Set scanPackage = new HashSet<>(); - - { - scanPackage.add("com.alibaba.nacos.api.naming.remote.request"); - scanPackage.add("com.alibaba.nacos.api.remote.request"); - scanPackage.add("com.alibaba.nacos.api.config.remote.request"); - scanPackage.add("com.alibaba.nacos.api.naming.remote.response"); - scanPackage.add("com.alibaba.nacos.api.config.remote.response"); - scanPackage.add("com.alibaba.nacos.api.remote.response"); - } - - @Override - public Set getScanPackage() { - return scanPackage; - } -} diff --git a/client/src/main/java/com/alibaba/nacos/client/remote/ClientPayloadPackageRegistry.java b/client/src/main/java/com/alibaba/nacos/client/remote/ClientPayloadPackageRegistry.java new file mode 100644 index 00000000000..2e4b17354dd --- /dev/null +++ b/client/src/main/java/com/alibaba/nacos/client/remote/ClientPayloadPackageRegistry.java @@ -0,0 +1,55 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.client.remote; + +import com.alibaba.nacos.api.remote.Payload; +import com.alibaba.nacos.common.remote.PayloadPackageRegistry; + +import java.util.HashSet; +import java.util.Set; + +/** + * client payload package registry. + * + * @author shiyiyue + */ +public class ClientPayloadPackageRegistry implements PayloadPackageRegistry { + + @Override + public Set> getPackagePayloads() { + HashSet> payloads = new HashSet<>(); + + //com.alibaba.nacos.api.remote.request + payloads.addAll(com.alibaba.nacos.api.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.remote.response + payloads.addAll(com.alibaba.nacos.api.remote.response.ResponseRegistry.getPayloads()); + + //com.alibaba.nacos.api.config.remote.request + payloads.addAll(com.alibaba.nacos.api.config.remote.request.RequestRegistry.getPayloads()); + + //com.alibaba.nacos.api.config.remote.response + payloads.addAll(com.alibaba.nacos.api.config.remote.response.ResponseRegistry.getPayloads()); + + //com.alibaba.nacos.api.naming.remote.request + payloads.addAll(com.alibaba.nacos.api.naming.remote.request.RequestRegistry.getPayloads()); + + //com.alibaba.nacos.api.naming.remote.response + payloads.addAll(com.alibaba.nacos.api.naming.remote.response.ResponseRegistry.getPayloads()); + + return payloads; + } +} diff --git a/client/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry b/client/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry new file mode 100644 index 00000000000..69d5df1a385 --- /dev/null +++ b/client/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry @@ -0,0 +1,17 @@ +# +# Copyright 1999-2020 Alibaba Group Holding Ltd. +# +# 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. +# + +com.alibaba.nacos.client.remote.ClientPayloadPackageRegistry \ No newline at end of file diff --git a/client/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider b/client/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry similarity index 91% rename from client/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider rename to client/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry index 26f9a08be88..8079cd09966 100644 --- a/client/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider +++ b/client/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry @@ -15,4 +15,4 @@ # # -com.alibaba.nacos.client.remote.ClientPayloadPackageProvider \ No newline at end of file +com.alibaba.nacos.client.remote.ClientPayloadPackageRegistry \ No newline at end of file diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/PayloadPackageProvider.java b/common/src/main/java/com/alibaba/nacos/common/remote/PayloadPackageRegistry.java similarity index 84% rename from common/src/main/java/com/alibaba/nacos/common/remote/PayloadPackageProvider.java rename to common/src/main/java/com/alibaba/nacos/common/remote/PayloadPackageRegistry.java index a9a19ab5d39..3176311fe76 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/PayloadPackageProvider.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/PayloadPackageRegistry.java @@ -16,6 +16,8 @@ package com.alibaba.nacos.common.remote; +import com.alibaba.nacos.api.remote.Payload; + import java.util.Set; /** @@ -23,12 +25,13 @@ * * @author hujun */ -public interface PayloadPackageProvider { +public interface PayloadPackageRegistry { /** * get scan package. + * * @return scan package list */ - Set getScanPackage(); + Set> getPackagePayloads(); } diff --git a/common/src/main/java/com/alibaba/nacos/common/remote/PayloadRegistry.java b/common/src/main/java/com/alibaba/nacos/common/remote/PayloadRegistry.java index 722a02ad406..23d88030020 100644 --- a/common/src/main/java/com/alibaba/nacos/common/remote/PayloadRegistry.java +++ b/common/src/main/java/com/alibaba/nacos/common/remote/PayloadRegistry.java @@ -17,7 +17,7 @@ package com.alibaba.nacos.common.remote; import com.alibaba.nacos.api.remote.Payload; -import com.alibaba.nacos.common.packagescan.DefaultPackageScan; + import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.HashSet; @@ -48,17 +48,13 @@ private static synchronized void scan() { return; } - ServiceLoader payloadPackages = ServiceLoader.load(PayloadPackageProvider.class); - Set result = new HashSet<>(); - for (PayloadPackageProvider payloadPackage : payloadPackages) { - result.addAll(payloadPackage.getScanPackage()); + ServiceLoader payloadPackages = ServiceLoader.load(PayloadPackageRegistry.class); + Set> result = new HashSet<>(); + for (PayloadPackageRegistry payloadPackage : payloadPackages) { + result.addAll(payloadPackage.getPackagePayloads()); } - for (String pkg : result) { - DefaultPackageScan packageScan = new DefaultPackageScan(); - Set> subTypesResponse = packageScan.getSubTypesOf(pkg, Payload.class); - for (Class clazz : subTypesResponse) { - register(clazz.getSimpleName(), clazz); - } + for (Class clazz : result) { + register(clazz.getSimpleName(), clazz); } initialized = true; } diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/MockPayloadPackageProvider.java b/common/src/test/java/com/alibaba/nacos/common/remote/MockPayloadPackageProvider.java deleted file mode 100644 index bf32b100600..00000000000 --- a/common/src/test/java/com/alibaba/nacos/common/remote/MockPayloadPackageProvider.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 1999-2018 Alibaba Group Holding Ltd. - * - * 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. - */ - -package com.alibaba.nacos.common.remote; - -import java.util.HashSet; -import java.util.Set; - -public class MockPayloadPackageProvider implements PayloadPackageProvider { - - private final Set scanPackage = new HashSet<>(); - - { - scanPackage.add("com.alibaba.nacos.api.naming.remote.request"); - scanPackage.add("com.alibaba.nacos.api.remote.request"); - scanPackage.add("com.alibaba.nacos.naming.cluster.remote.request"); - scanPackage.add("com.alibaba.nacos.api.naming.remote.response"); - scanPackage.add("com.alibaba.nacos.api.config.remote.response"); - scanPackage.add("com.alibaba.nacos.api.remote.response"); - scanPackage.add("com.alibaba.nacos.naming.cluster.remote.response"); - } - - @Override - public Set getScanPackage() { - return scanPackage; - } -} diff --git a/common/src/test/java/com/alibaba/nacos/common/remote/MockPayloadPackageRegistry.java b/common/src/test/java/com/alibaba/nacos/common/remote/MockPayloadPackageRegistry.java new file mode 100644 index 00000000000..0f1159ccad4 --- /dev/null +++ b/common/src/test/java/com/alibaba/nacos/common/remote/MockPayloadPackageRegistry.java @@ -0,0 +1,42 @@ +/* + * Copyright 1999-2018 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.common.remote; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +public class MockPayloadPackageRegistry implements PayloadPackageRegistry { + @Override + public Set> getPackagePayloads() { + HashSet> payloads = new HashSet<>(); + + //com.alibaba.nacos.api.remote.request + payloads.addAll(com.alibaba.nacos.api.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.remote.response + payloads.addAll(com.alibaba.nacos.api.remote.response.ResponseRegistry.getPayloads()); + + //com.alibaba.nacos.api.naming.remote.request.cluster + payloads.addAll(com.alibaba.nacos.api.naming.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.config.remote.response.cluster + payloads.addAll(com.alibaba.nacos.api.naming.remote.response.ResponseRegistry.getPayloads()); + + return payloads; + } + +} diff --git a/common/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider b/common/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry similarity index 91% rename from common/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider rename to common/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry index f8b9cce83e4..06e53d8fcd2 100644 --- a/common/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider +++ b/common/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry @@ -15,4 +15,4 @@ # # -com.alibaba.nacos.common.remote.MockPayloadPackageProvider \ No newline at end of file +com.alibaba.nacos.common.remote.MockPayloadPackageRegistry \ No newline at end of file diff --git a/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigPayloadPackageProvider.java b/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigPayloadPackageProvider.java deleted file mode 100644 index bb098f090dc..00000000000 --- a/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigPayloadPackageProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 1999-2021 Alibaba Group Holding Ltd. - * - * 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. - */ - -package com.alibaba.nacos.config.server.remote; - -import com.alibaba.nacos.common.remote.PayloadPackageProvider; - -import java.util.HashSet; -import java.util.Set; - -/** - * config package provider. - * - * @author hujun - */ -public class ConfigPayloadPackageProvider implements PayloadPackageProvider { - - private final Set scanPackage = new HashSet<>(); - - { - scanPackage.add("com.alibaba.nacos.api.remote.request"); - scanPackage.add("com.alibaba.nacos.api.remote.response"); - scanPackage.add("com.alibaba.nacos.api.config.remote.request"); - scanPackage.add("com.alibaba.nacos.api.config.remote.response"); - } - - @Override - public Set getScanPackage() { - return scanPackage; - } -} diff --git a/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigPayloadPackageRegistry.java b/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigPayloadPackageRegistry.java new file mode 100644 index 00000000000..374b99e7d0f --- /dev/null +++ b/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigPayloadPackageRegistry.java @@ -0,0 +1,54 @@ +/* + * Copyright 1999-2021 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.config.server.remote; + +import com.alibaba.nacos.api.remote.Payload; +import com.alibaba.nacos.common.remote.PayloadPackageRegistry; + +import java.util.HashSet; +import java.util.Set; + +/** + * config package provider. + * + * @author hujun + * @author shiyiyue + */ +public class ConfigPayloadPackageRegistry implements PayloadPackageRegistry { + + @Override + public Set> getPackagePayloads() { + HashSet> payloads = new HashSet<>(); + + //com.alibaba.nacos.api.remote.request + payloads.addAll(com.alibaba.nacos.api.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.remote.response + payloads.addAll(com.alibaba.nacos.api.remote.response.ResponseRegistry.getPayloads()); + + //com.alibaba.nacos.api.config.remote.request + payloads.addAll(com.alibaba.nacos.api.config.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.config.remote.response + payloads.addAll(com.alibaba.nacos.api.config.remote.response.ResponseRegistry.getPayloads()); + + //com.alibaba.nacos.api.config.remote.request.cluster + payloads.addAll(com.alibaba.nacos.api.config.remote.request.cluster.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.config.remote.response.cluster + payloads.addAll(com.alibaba.nacos.api.config.remote.response.cluster.ResponseRegistry.getPayloads()); + + return payloads; + } +} diff --git a/config/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry b/config/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry new file mode 100644 index 00000000000..84b94e13881 --- /dev/null +++ b/config/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry @@ -0,0 +1,17 @@ +# +# Copyright 1999-2020 Alibaba Group Holding Ltd. +# +# 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. +# + +com.alibaba.nacos.config.server.remote.ConfigPayloadPackageRegistry \ No newline at end of file diff --git a/config/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider b/config/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider deleted file mode 100644 index 7295acaee6d..00000000000 --- a/config/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 1999-2021 Alibaba Group Holding Ltd. -# -# 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. -# -# - -com.alibaba.nacos.config.server.remote.ConfigPayloadPackageProvider \ No newline at end of file diff --git a/config/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider b/config/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry similarity index 90% rename from config/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider rename to config/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry index 7295acaee6d..44a0459ba07 100644 --- a/config/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider +++ b/config/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry @@ -15,4 +15,4 @@ # # -com.alibaba.nacos.config.server.remote.ConfigPayloadPackageProvider \ No newline at end of file +com.alibaba.nacos.config.server.remote.ConfigPayloadPackageRegistry \ No newline at end of file diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/MockPayloadPackageProvider.java b/core/src/test/java/com/alibaba/nacos/core/remote/MockPayloadPackageProvider.java deleted file mode 100644 index f2d1cbd9de7..00000000000 --- a/core/src/test/java/com/alibaba/nacos/core/remote/MockPayloadPackageProvider.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 1999-2021 Alibaba Group Holding Ltd. - * - * 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. - */ - -package com.alibaba.nacos.core.remote; - -import com.alibaba.nacos.common.remote.PayloadPackageProvider; - -import java.util.HashSet; -import java.util.Set; - -/** - * test package provider. - * - * @author hujun - */ -public class MockPayloadPackageProvider implements PayloadPackageProvider { - - private final Set scanPackage = new HashSet<>(); - - { - scanPackage.add("com.alibaba.nacos.api.naming.remote.request"); - scanPackage.add("com.alibaba.nacos.api.remote.request"); - scanPackage.add("com.alibaba.nacos.naming.cluster.remote.request"); - scanPackage.add("com.alibaba.nacos.api.config.remote.request"); - scanPackage.add("com.alibaba.nacos.api.naming.remote.response"); - scanPackage.add("com.alibaba.nacos.api.config.remote.response"); - scanPackage.add("com.alibaba.nacos.api.remote.response"); - scanPackage.add("com.alibaba.nacos.naming.cluster.remote.response"); - } - - @Override - public Set getScanPackage() { - return scanPackage; - } -} diff --git a/core/src/test/java/com/alibaba/nacos/core/remote/MockPayloadPackageRegistry.java b/core/src/test/java/com/alibaba/nacos/core/remote/MockPayloadPackageRegistry.java new file mode 100644 index 00000000000..6daf9b5b033 --- /dev/null +++ b/core/src/test/java/com/alibaba/nacos/core/remote/MockPayloadPackageRegistry.java @@ -0,0 +1,48 @@ +/* + * Copyright 1999-2021 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.core.remote; + +import com.alibaba.nacos.api.remote.Payload; +import com.alibaba.nacos.common.remote.PayloadPackageRegistry; + +import java.util.HashSet; +import java.util.Set; + +/** + * test package provider. + * + * @author hujun + */ +public class MockPayloadPackageRegistry implements PayloadPackageRegistry { + + @Override + public Set> getPackagePayloads() { + HashSet> payloads = new HashSet<>(); + + //com.alibaba.nacos.api.remote.request + payloads.addAll(com.alibaba.nacos.api.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.remote.response + payloads.addAll(com.alibaba.nacos.api.remote.response.ResponseRegistry.getPayloads()); + + //com.alibaba.nacos.api.naming.remote.request.cluster + payloads.addAll(com.alibaba.nacos.api.naming.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.config.remote.response.cluster + payloads.addAll(com.alibaba.nacos.api.naming.remote.response.ResponseRegistry.getPayloads()); + + return payloads; + } +} diff --git a/core/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider b/core/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry similarity index 91% rename from core/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider rename to core/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry index 12bc123e718..98101090cb4 100644 --- a/core/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider +++ b/core/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry @@ -15,4 +15,4 @@ # # -com.alibaba.nacos.core.remote.MockPayloadPackageProvider \ No newline at end of file +com.alibaba.nacos.core.remote.MockPayloadPackageRegistry \ No newline at end of file diff --git a/naming/src/main/java/com/alibaba/nacos/naming/cluster/remote/request/RequestRegistry.java b/naming/src/main/java/com/alibaba/nacos/naming/cluster/remote/request/RequestRegistry.java new file mode 100644 index 00000000000..5a6800b033c --- /dev/null +++ b/naming/src/main/java/com/alibaba/nacos/naming/cluster/remote/request/RequestRegistry.java @@ -0,0 +1,43 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.naming.cluster.remote.request; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * payload registry. + * + * @author shiyiyue + */ +public class RequestRegistry { + + private static Set> payloads = registryPayload(); + + private static Set> registryPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(AbstractClusterRequest.class); + payloads.add(DistroDataRequest.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } +} diff --git a/naming/src/main/java/com/alibaba/nacos/naming/cluster/remote/response/ResponseRegistry.java b/naming/src/main/java/com/alibaba/nacos/naming/cluster/remote/response/ResponseRegistry.java new file mode 100644 index 00000000000..8a653f9479d --- /dev/null +++ b/naming/src/main/java/com/alibaba/nacos/naming/cluster/remote/response/ResponseRegistry.java @@ -0,0 +1,42 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.naming.cluster.remote.response; + +import com.alibaba.nacos.api.remote.Payload; + +import java.util.HashSet; +import java.util.Set; + +/** + * pay load registry. + * + * @author shiyiyue + */ +public class ResponseRegistry { + + private static Set> payloads = getPayload(); + + private static Set> getPayload() { + HashSet> payloads = new HashSet<>(); + payloads.add(DistroDataResponse.class); + return payloads; + } + + public static final Set> getPayloads() { + return payloads; + } +} diff --git a/naming/src/main/java/com/alibaba/nacos/naming/remote/rpc/NamingPayloadPackageProvider.java b/naming/src/main/java/com/alibaba/nacos/naming/remote/rpc/NamingPayloadPackageProvider.java deleted file mode 100644 index fccc0a520fb..00000000000 --- a/naming/src/main/java/com/alibaba/nacos/naming/remote/rpc/NamingPayloadPackageProvider.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 1999-2021 Alibaba Group Holding Ltd. - * - * 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. - */ - -package com.alibaba.nacos.naming.remote.rpc; - -import com.alibaba.nacos.common.remote.PayloadPackageProvider; - -import java.util.HashSet; -import java.util.Set; - -/** - * naming package provider. - * - * @author hujun - */ -public class NamingPayloadPackageProvider implements PayloadPackageProvider { - - private final Set scanPackage = new HashSet<>(); - - { - scanPackage.add("com.alibaba.nacos.api.remote.request"); - scanPackage.add("com.alibaba.nacos.api.remote.response"); - scanPackage.add("com.alibaba.nacos.api.naming.remote.request"); - scanPackage.add("com.alibaba.nacos.naming.cluster.remote.request"); - scanPackage.add("com.alibaba.nacos.api.naming.remote.response"); - scanPackage.add("com.alibaba.nacos.naming.cluster.remote.response"); - } - - @Override - public Set getScanPackage() { - return scanPackage; - } -} diff --git a/naming/src/main/java/com/alibaba/nacos/naming/remote/rpc/NamingPayloadPackageRegistry.java b/naming/src/main/java/com/alibaba/nacos/naming/remote/rpc/NamingPayloadPackageRegistry.java new file mode 100644 index 00000000000..fef8a4ac646 --- /dev/null +++ b/naming/src/main/java/com/alibaba/nacos/naming/remote/rpc/NamingPayloadPackageRegistry.java @@ -0,0 +1,53 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * 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. + */ + +package com.alibaba.nacos.naming.remote.rpc; + +import com.alibaba.nacos.api.remote.Payload; +import com.alibaba.nacos.common.remote.PayloadPackageRegistry; + +import java.util.HashSet; +import java.util.Set; + +/** + * naming module package payload registry. + * + * @author shiyiyue + */ +public class NamingPayloadPackageRegistry implements PayloadPackageRegistry { + + @Override + public Set> getPackagePayloads() { + HashSet> payloads = new HashSet<>(); + + //com.alibaba.nacos.api.remote.request + payloads.addAll(com.alibaba.nacos.api.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.remote.response + payloads.addAll(com.alibaba.nacos.api.remote.response.ResponseRegistry.getPayloads()); + + //com.alibaba.nacos.api.naming.remote.request.cluster + payloads.addAll(com.alibaba.nacos.api.naming.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.config.remote.response.cluster + payloads.addAll(com.alibaba.nacos.api.naming.remote.response.ResponseRegistry.getPayloads()); + + //com.alibaba.nacos.api.naming.remote.request.cluster + payloads.addAll(com.alibaba.nacos.naming.cluster.remote.request.RequestRegistry.getPayloads()); + //com.alibaba.nacos.api.config.remote.response.cluster + payloads.addAll(com.alibaba.nacos.naming.cluster.remote.response.ResponseRegistry.getPayloads()); + + return payloads; + } +} diff --git a/naming/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider b/naming/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider deleted file mode 100644 index 6ab52b4eccf..00000000000 --- a/naming/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 1999-2021 Alibaba Group Holding Ltd. -# -# 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. -# -# - -com.alibaba.nacos.naming.remote.rpc.NamingPayloadPackageProvider \ No newline at end of file diff --git a/naming/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry b/naming/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry new file mode 100644 index 00000000000..8e35ae8d332 --- /dev/null +++ b/naming/src/main/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry @@ -0,0 +1,17 @@ +# +# Copyright 1999-2020 Alibaba Group Holding Ltd. +# +# 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. +# + +com.alibaba.nacos.naming.remote.rpc.NamingPayloadPackageRegistry \ No newline at end of file diff --git a/naming/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider b/naming/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider deleted file mode 100644 index 6ab52b4eccf..00000000000 --- a/naming/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 1999-2021 Alibaba Group Holding Ltd. -# -# 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. -# -# - -com.alibaba.nacos.naming.remote.rpc.NamingPayloadPackageProvider \ No newline at end of file diff --git a/client/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider b/naming/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry similarity index 90% rename from client/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider rename to naming/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry index 26f9a08be88..cc264cd1ff8 100644 --- a/client/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageProvider +++ b/naming/src/test/resources/META-INF/services/com.alibaba.nacos.common.remote.PayloadPackageRegistry @@ -15,4 +15,4 @@ # # -com.alibaba.nacos.client.remote.ClientPayloadPackageProvider \ No newline at end of file +com.alibaba.nacos.naming.remote.rpc.NamingPayloadPackageRegistry \ No newline at end of file