diff --git a/apm-collector/apm-collector-cluster/collector-cluster-define/src/main/java/org/skywalking/apm/collector/cluster/ClusterModule.java b/apm-collector/apm-collector-cluster/collector-cluster-define/src/main/java/org/skywalking/apm/collector/cluster/ClusterModule.java index f6963c24d00670a7277b85b359e0f70fae97b8e7..9d0952aa7a0471dea18e68233924d0e38b64b23f 100644 --- a/apm-collector/apm-collector-cluster/collector-cluster-define/src/main/java/org/skywalking/apm/collector/cluster/ClusterModule.java +++ b/apm-collector/apm-collector-cluster/collector-cluster-define/src/main/java/org/skywalking/apm/collector/cluster/ClusterModule.java @@ -18,6 +18,7 @@ package org.skywalking.apm.collector.cluster; +import org.skywalking.apm.collector.cluster.service.ModuleRegisterService; import org.skywalking.apm.collector.core.module.Module; import org.skywalking.apm.collector.core.module.Service; @@ -26,11 +27,13 @@ import org.skywalking.apm.collector.core.module.Service; */ public class ClusterModule extends Module { + public static final String NAME = "Cluster"; + @Override public String name() { - return "Cluster"; + return NAME; } @Override public Class[] services() { - return new Class[0]; + return new Class[] {ModuleRegisterService.class}; } } diff --git a/apm-collector/apm-collector-naming/collector-naming-define/pom.xml b/apm-collector/apm-collector-naming/collector-naming-define/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..0a47a1fc8ee82f0a68e2090e73a308a1da965f98 --- /dev/null +++ b/apm-collector/apm-collector-naming/collector-naming-define/pom.xml @@ -0,0 +1,33 @@ + + + + + + apm-collector-naming + org.skywalking + 3.2.3-2017 + + 4.0.0 + + collector-naming-define + jar + + \ No newline at end of file diff --git a/apm-collector/apm-collector-naming/collector-naming-define/src/main/java/org/skywalking/apm/collector/naming/NamingModule.java b/apm-collector/apm-collector-naming/collector-naming-define/src/main/java/org/skywalking/apm/collector/naming/NamingModule.java new file mode 100644 index 0000000000000000000000000000000000000000..460ca0ad84846cdc4e39c7f3fd2b8f36568bee15 --- /dev/null +++ b/apm-collector/apm-collector-naming/collector-naming-define/src/main/java/org/skywalking/apm/collector/naming/NamingModule.java @@ -0,0 +1,38 @@ +/* + * Copyright 2017, OpenSkywalking Organization All rights reserved. + * + * 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. + * + * Project repository: https://github.com/OpenSkywalking/skywalking + */ + +package org.skywalking.apm.collector.naming; + +import org.skywalking.apm.collector.core.module.Module; +import org.skywalking.apm.collector.core.module.Service; + +/** + * @author peng-yongsheng + */ +public class NamingModule extends Module { + + public static final String NAME = "Naming"; + + @Override public String name() { + return NAME; + } + + @Override public Class[] services() { + return new Class[0]; + } +} diff --git a/apm-collector/apm-collector-naming/collector-naming-define/src/main/resources/META-INF/services/org.skywalking.apm.collector.core.module.Module b/apm-collector/apm-collector-naming/collector-naming-define/src/main/resources/META-INF/services/org.skywalking.apm.collector.core.module.Module new file mode 100644 index 0000000000000000000000000000000000000000..bab5f5ee6e06d0e4ca6c302b90210d3b7bd7bb19 --- /dev/null +++ b/apm-collector/apm-collector-naming/collector-naming-define/src/main/resources/META-INF/services/org.skywalking.apm.collector.core.module.Module @@ -0,0 +1,19 @@ +# +# Copyright 2017, OpenSkywalking Organization All rights reserved. +# +# 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. +# +# Project repository: https://github.com/OpenSkywalking/skywalking +# + +org.skywalking.apm.collector.naming.NamingModule \ No newline at end of file diff --git a/apm-collector/apm-collector-naming/collector-naming-jetty-provider/pom.xml b/apm-collector/apm-collector-naming/collector-naming-jetty-provider/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..27c92d9494cb523c93091982d4f4043325a65b26 --- /dev/null +++ b/apm-collector/apm-collector-naming/collector-naming-jetty-provider/pom.xml @@ -0,0 +1,45 @@ + + + + + + apm-collector-naming + org.skywalking + 3.2.3-2017 + + 4.0.0 + + collector-naming-jetty-provider + jar + + + + org.skywalking + collector-naming-define + ${project.version} + + + org.skywalking + collector-cluster-define + ${project.version} + + + \ No newline at end of file diff --git a/apm-collector/apm-collector-naming/collector-naming-jetty-provider/src/main/java/org/skywalking/apm/collector/naming/jetty/NamingModuleJettyProvider.java b/apm-collector/apm-collector-naming/collector-naming-jetty-provider/src/main/java/org/skywalking/apm/collector/naming/jetty/NamingModuleJettyProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..c58257c98e4946df7878ff995d572a86bbdf7d77 --- /dev/null +++ b/apm-collector/apm-collector-naming/collector-naming-jetty-provider/src/main/java/org/skywalking/apm/collector/naming/jetty/NamingModuleJettyProvider.java @@ -0,0 +1,51 @@ +/* + * Copyright 2017, OpenSkywalking Organization All rights reserved. + * + * 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. + * + * Project repository: https://github.com/OpenSkywalking/skywalking + */ + +package org.skywalking.apm.collector.naming.jetty; + +import java.util.Properties; +import org.skywalking.apm.collector.cluster.ClusterModule; +import org.skywalking.apm.collector.core.module.Module; +import org.skywalking.apm.collector.core.module.ModuleProvider; +import org.skywalking.apm.collector.core.module.ServiceNotProvidedException; +import org.skywalking.apm.collector.naming.NamingModule; + +/** + * @author peng-yongsheng + */ +public class NamingModuleJettyProvider extends ModuleProvider { + + @Override public String name() { + return "jetty"; + } + + @Override public Class module() { + return NamingModule.class; + } + + @Override public void prepare(Properties config) throws ServiceNotProvidedException { + } + + @Override public void init(Properties config) throws ServiceNotProvidedException { + + } + + @Override public String[] requiredModules() { + return new String[] {ClusterModule.NAME}; + } +} diff --git a/apm-collector/apm-collector-naming/collector-naming-jetty-provider/src/main/resources/META-INF/services/org.skywalking.apm.collector.core.module.ModuleProvider b/apm-collector/apm-collector-naming/collector-naming-jetty-provider/src/main/resources/META-INF/services/org.skywalking.apm.collector.core.module.ModuleProvider new file mode 100644 index 0000000000000000000000000000000000000000..d28ccf145c507ace2756f801ead43e2764fe4549 --- /dev/null +++ b/apm-collector/apm-collector-naming/collector-naming-jetty-provider/src/main/resources/META-INF/services/org.skywalking.apm.collector.core.module.ModuleProvider @@ -0,0 +1,19 @@ +# +# Copyright 2017, OpenSkywalking Organization All rights reserved. +# +# 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. +# +# Project repository: https://github.com/OpenSkywalking/skywalking +# + +org.skywalking.apm.collector.naming.jetty.NamingModuleJettyProvider \ No newline at end of file diff --git a/apm-collector/apm-collector-naming/pom.xml b/apm-collector/apm-collector-naming/pom.xml index 1127f73e4394d8fa0b299e9147e56827730107c4..4762a9e86d088a208a880e0a3b11a47ee43b97e9 100644 --- a/apm-collector/apm-collector-naming/pom.xml +++ b/apm-collector/apm-collector-naming/pom.xml @@ -10,6 +10,17 @@ 4.0.0 apm-collector-naming - jar + pom + + collector-naming-define + collector-naming-jetty-provider + + + + org.skywalking + apm-collector-core + ${project.version} + + \ No newline at end of file