diff --git a/dubbo/README.md b/all/README.md
similarity index 100%
rename from dubbo/README.md
rename to all/README.md
diff --git a/dubbo/pom.xml b/all/pom.xml
similarity index 73%
rename from dubbo/pom.xml
rename to all/pom.xml
index 34465a7a5b..9bd666253b 100644
--- a/dubbo/pom.xml
+++ b/all/pom.xml
@@ -21,318 +21,297 @@ limitations under the License.
com.alibaba
dubbo-parent
2.6.0
+ ../pom.xml
dubbo
+ 2.6.0
jar
- ${project.artifactId}
+ dubbo-all
The all in one project of dubbo
false
+
+ com.alibaba
+ dubbo-cluster
+ ${project.version}
+ compile
+ true
+
+
+ com.alibaba
+ dubbo-common
+ ${project.version}
+ compile
+ true
+
com.alibaba
dubbo-config-api
- ${project.parent.version}
-
-
- org.mortbay.jetty
- jetty
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-config-spring
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
+
+
+ com.alibaba
+ dubbo-filter-cache
+ ${project.version}
+ compile
+ true
+
+
+ com.alibaba
+ dubbo-filter-validation
+ ${project.version}
+ compile
+ true
+
+
+ com.alibaba
+ dubbo-remoting-api
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-remoting-netty
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-remoting-netty4
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-remoting-mina
- ${project.parent.version}
-
-
- org.apache.mina
- mina-core
-
-
- org.slf4j
- slf4j-api
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-remoting-grizzly
- ${project.parent.version}
-
-
- org.glassfish.grizzly
- grizzly-core
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-remoting-p2p
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-remoting-http
- ${project.parent.version}
-
-
- org.mortbay.jetty
- jetty
-
-
- org.apache.httpcomponents
- httpclient
-
-
- org.apache.tomcat.embed
- tomcat-embed-core
-
-
- org.apache.tomcat.embed
- tomcat-embed-logging-juli
-
-
+ ${project.version}
+ compile
+ true
+
+
+ com.alibaba
+ dubbo-rpc-api
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-default
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-injvm
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-rmi
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-hessian
- ${project.parent.version}
-
-
- com.caucho
- hessian
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-http
- ${project.parent.version}
-
-
- com.caucho
- hessian
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-webservice
- ${project.parent.version}
-
-
- org.apache.cxf
- cxf-rt-frontend-simple
-
-
- org.apache.cxf
- cxf-rt-transports-http
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-thrift
- ${project.parent.version}
-
-
- org.apache.thrift
- libthrift
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-memcached
- ${project.parent.version}
-
-
- com.googlecode.xmemcached
- xmemcached
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-redis
- ${project.parent.version}
-
-
- redis.clients
- jedis
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-rpc-rest
- ${project.parent.version}
-
-
- org.jboss.resteasy
- resteasy-jaxrs
-
-
- org.jboss.resteasy
- resteasy-client
-
-
- org.jboss.resteasy
- resteasy-netty4
-
-
- org.jboss.resteasy
- resteasy-jdk-http
-
-
- org.jboss.resteasy
- resteasy-undertow
-
-
- io.undertow
- undertow-servlet
-
-
- io.undertow
- undertow-core
-
-
- org.jboss.resteasy
- resteasy-jackson-provider
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
-
- javax.validation
- validation-api
-
-
+ ${project.version}
+ compile
+ true
+
+
+ com.alibaba
+ dubbo-registry-api
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-registry-default
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-registry-multicast
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-registry-zookeeper
- ${project.parent.version}
-
-
- org.apache.zookeeper
- zookeeper
-
-
- com.101tec
- zkclient
-
-
- org.apache.curator
- curator-framework
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-registry-redis
- ${project.parent.version}
-
-
- redis.clients
- jedis
-
-
+ ${project.version}
+ compile
+ true
+
+
+ com.alibaba
+ dubbo-monitor-api
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-monitor-default
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-container-spring
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-container-jetty
- ${project.parent.version}
-
-
- org.mortbay.jetty
- jetty
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-container-log4j
- ${project.parent.version}
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-container-logback
- ${project.parent.version}
-
-
- ch.qos.logback
- logback-classic
-
-
+ ${project.version}
+ compile
+ true
com.alibaba
dubbo-qos
- ${project.parent.version}
-
-
- org.apache.commons
- commons-lang3
-
-
- io.netty
- netty-all
-
-
+ ${project.version}
+ compile
+ true
+
+
+ com.alibaba
+ hessian-lite
+ 3.2.1-fixed-2
+ compile
+ true
+
+
+
+
+ org.springframework
+ spring-context
+
+
+ org.springframework
+ spring-beans
+
+
+ org.springframework
+ spring-web
+
+
+ org.javassist
+ javassist
+
+
+ org.jboss.netty
+ netty
diff --git a/bom/pom.xml b/bom/pom.xml
new file mode 100644
index 0000000000..888e85c8eb
--- /dev/null
+++ b/bom/pom.xml
@@ -0,0 +1,269 @@
+
+
+
+ 4.0.0
+
+
+
+
+
+
+
+
+ org.sonatype.oss
+ oss-parent
+ 7
+
+
+
+ com.alibaba
+ dubbo-bom
+ 2.6.0
+ pom
+
+ dubbo-bom
+ Dubbo dependencies BOM
+ http://dubbo.io
+
+ 2011
+
+
+ Apache 2
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+ The Dubbo Project
+ http://dubbo.io
+
+
+
+ Github Issues
+ https://github.com/alibaba/dubbo/issues
+
+
+ https://github.com/alibaba/dubbo/tree/master
+ scm:git:git://github.com/alibaba/dubbo.git
+ scm:git:git@github.com:alibaba/dubbo.git
+
+
+
+ Dubbo User Mailling List
+ dubbo+subscribe@googlegroups.com
+ dubbo+unsubscribe@googlegroups.com
+ dubbo@googlegroups.com
+ http://groups.google.com/group/dubbo
+
+
+ Dubbo Developer Mailling List
+ dubbo-developers+subscribe@googlegroups.com
+ dubbo-developers+unsubscribe@googlegroups.com
+ dubbo-developers@googlegroups.com
+ http://groups.google.com/group/dubbo-developers
+
+
+
+
+ dubbo.io
+ The Dubbo Project Contributors
+ dubbo@googlegroups.com
+ http://dubbo.io
+ The Dubbo Project
+ http://dubbo.io
+
+
+
+
+
+
+ com.alibaba
+ dubbo-cluster
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-common
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-config-api
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-config-spring
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-filter-cache
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-filter-validation
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-remoting-api
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-remoting-netty
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-remoting-netty4
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-remoting-mina
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-remoting-grizzly
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-remoting-p2p
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-remoting-http
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-api
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-default
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-injvm
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-rmi
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-hessian
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-http
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-webservice
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-thrift
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-memcached
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-redis
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-rpc-rest
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-registry-api
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-registry-default
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-registry-multicast
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-registry-zookeeper
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-registry-redis
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-monitor-api
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-monitor-default
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-container-spring
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-container-jetty
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-container-log4j
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-container-logback
+ ${project.version}
+
+
+ com.alibaba
+ dubbo-qos
+ ${project.version}
+
+
+ com.alibaba
+ hessian-lite
+ 3.2.1-fixed-2
+
+
+
+
+
\ No newline at end of file
diff --git a/dependencies-bom/pom.xml b/dependencies-bom/pom.xml
new file mode 100644
index 0000000000..b481c4e357
--- /dev/null
+++ b/dependencies-bom/pom.xml
@@ -0,0 +1,379 @@
+
+
+ 4.0.0
+
+
+ org.sonatype.oss
+ oss-parent
+ 7
+
+
+
+ com.alibaba
+ dubbo-dependencies
+ 2.6.0
+ pom
+
+ dubbo-dependencies-bom
+ Dubbo dependencies BOM
+ http://dubbo.io
+
+ 2011
+
+
+ Apache 2
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+ The Dubbo Project
+ http://dubbo.io
+
+
+
+ Github Issues
+ https://github.com/alibaba/dubbo/issues
+
+
+ https://github.com/alibaba/dubbo/tree/master
+ scm:git:git://github.com/alibaba/dubbo.git
+ scm:git:git@github.com:alibaba/dubbo.git
+
+
+
+ Dubbo User Mailling List
+ dubbo+subscribe@googlegroups.com
+ dubbo+unsubscribe@googlegroups.com
+ dubbo@googlegroups.com
+ http://groups.google.com/group/dubbo
+
+
+ Dubbo Developer Mailling List
+ dubbo-developers+subscribe@googlegroups.com
+ dubbo-developers+unsubscribe@googlegroups.com
+ dubbo-developers@googlegroups.com
+ http://groups.google.com/group/dubbo-developers
+
+
+
+
+ dubbo.io
+ The Dubbo Project Contributors
+ dubbo@googlegroups.com
+ http://dubbo.io
+ The Dubbo Project
+ http://dubbo.io
+
+
+
+
+
+ 4.3.10.RELEASE
+ 3.20.0-GA
+ 3.2.5.Final
+ 4.0.35.Final
+ 1.1.7
+ 2.1.4
+ 4.5.3
+ 1.4.1
+ 1.2.31
+ 3.1
+ 0.8
+ 3.4.9
+ 0.2
+ 2.12.0
+ 2.9.0
+ 1.3.6
+ 3.0.14
+ 0.8.0
+ 1.0.13
+ 4.0.38
+ 3.1.0
+ 6.1.26
+ 1.1.0.Final
+ 5.4.1.Final
+ 3.0.1-b08
+ 1.0.0
+ 2.0-M5.1
+ 3.0
+ 3.1.6
+ 1.7
+ 4.0.1
+ 0.42
+ 2.48-jdk-6
+
+ 2.0
+ 3.0.19.Final
+ 8.0.11
+
+ 1.7.25
+ 1.2
+ 1.2.16
+ 1.2.2
+ 3.4
+
+
+
+
+
+
+ org.springframework
+ spring-framework-bom
+ ${spring_version}
+ pom
+ import
+
+
+ org.javassist
+ javassist
+ ${javassist_version}
+
+
+ org.jboss.netty
+ netty
+ ${netty_version}
+
+
+ io.netty
+ netty-all
+ ${netty4_version}
+
+
+ org.apache.mina
+ mina-core
+ ${mina_version}
+
+
+ org.glassfish.grizzly
+ grizzly-core
+ ${grizzly_version}
+
+
+ org.apache.httpcomponents
+ httpclient
+ ${httpclient_version}
+
+
+ com.alibaba
+ fastjson
+ ${fastjson_version}
+
+
+ com.thoughtworks.xstream
+ xstream
+ ${xstream_version}
+
+
+ org.apache.bsf
+ bsf-api
+ ${bsf_version}
+
+
+ org.jvnet.sorcerer
+ sorcerer-javac
+ ${sorcerer_version}
+
+
+ org.apache.zookeeper
+ zookeeper
+ ${zookeeper_version}
+
+
+ com.101tec
+ zkclient
+ ${zkclient_version}
+
+
+ org.apache.curator
+ curator-framework
+ ${curator_version}
+
+
+ redis.clients
+ jedis
+ ${jedis_version}
+
+
+ com.googlecode.xmemcached
+ xmemcached
+ ${xmemcached_version}
+
+
+ org.apache.cxf
+ cxf-rt-frontend-simple
+ ${cxf_version}
+
+
+ org.apache.cxf
+ cxf-rt-transports-http
+ ${cxf_version}
+
+
+ org.apache.thrift
+ libthrift
+ ${thrift_version}
+
+
+ jfree
+ jfreechart
+ ${jfreechart_version}
+
+
+ com.caucho
+ hessian
+ ${hessian_version}
+
+
+ javax.servlet
+ javax.servlet-api
+ ${servlet_version}
+
+
+ org.mortbay.jetty
+ jetty
+ ${jetty_version}
+
+
+ javax.validation
+ validation-api
+ ${validation_version}
+
+
+ org.hibernate
+ hibernate-validator
+ ${hibernate_validator_version}
+
+
+ org.glassfish
+ javax.el
+ ${jel_version}
+
+
+ javax.cache
+ cache-api
+ ${jcache_version}
+
+
+ org.apache.tuscany.sca
+ tuscany-sca-api
+ ${sca_version}
+
+
+ com.google.inject
+ guice
+ ${guice_version}
+
+
+ com.alibaba.citrus
+ citrus-webx-all
+ ${webx_version}
+
+
+ org.apache.velocity
+ velocity
+ ${velocity_version}
+
+
+ com.esotericsoftware
+ kryo
+ ${kryo_version}
+
+
+ de.javakaffee
+ kryo-serializers
+ ${kryo_serializers_version}
+
+
+ de.ruedigermoeller
+ fst
+ ${fst_version}
+
+
+ javax.ws.rs
+ javax.ws.rs-api
+ ${rs_api_version}
+
+
+ org.jboss.resteasy
+ resteasy-jaxrs
+ ${resteasy_version}
+
+
+ org.jboss.resteasy
+ resteasy-client
+ ${resteasy_version}
+
+
+ org.jboss.resteasy
+ resteasy-netty4
+ ${resteasy_version}
+
+
+ io.netty
+ netty-all
+
+
+
+
+ org.jboss.resteasy
+ resteasy-jdk-http
+ ${resteasy_version}
+
+
+ org.jboss.resteasy
+ resteasy-jackson-provider
+ ${resteasy_version}
+
+
+ org.jboss.resteasy
+ resteasy-jaxb-provider
+ ${resteasy_version}
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-core
+ ${tomcat_embed_version}
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-logging-juli
+ ${tomcat_embed_version}
+
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j_version}
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j_version}
+
+
+ commons-logging
+ commons-logging
+ ${jcl_version}
+
+
+ log4j
+ log4j
+ ${log4j_version}
+
+
+ ch.qos.logback
+ logback-classic
+ ${logback_version}
+
+
+ org.apache.commons
+ commons-lang3
+ ${commons_lang3_version}
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-admin/pom.xml b/dubbo-admin/pom.xml
deleted file mode 100644
index 2a6251e79f..0000000000
--- a/dubbo-admin/pom.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
- 4.0.0
-
- com.alibaba
- dubbo-parent
- 2.6.0
-
- dubbo-admin
- war
- ${project.artifactId}
- The admin module of dubbo project
-
- 1.5
- /
- false
- false
-
-
-
-
-
- org.springframework
- spring-framework-bom
- 3.2.16.RELEASE
- import
- pom
-
-
-
-
-
- com.alibaba
- dubbo
- ${project.parent.version}
-
-
- com.alibaba.citrus
- citrus-webx-all
-
-
- org.javassist
- javassist
-
-
- org.jboss.netty
- netty
-
-
- org.apache.mina
- mina-core
-
-
- org.glassfish.grizzly
- grizzly-core
-
-
- org.apache.httpcomponents
- httpclient
-
-
- com.alibaba
- fastjson
-
-
- com.thoughtworks.xstream
- xstream
-
-
- org.apache.bsf
- bsf-api
-
-
- org.apache.zookeeper
- zookeeper
-
-
- com.101tec
- zkclient
-
-
- org.apache.curator
- curator-framework
-
-
- com.googlecode.xmemcached
- xmemcached
-
-
- org.apache.thrift
- libthrift
-
-
- com.caucho
- hessian
-
-
- javax.servlet
- javax.servlet-api
- provided
-
-
- log4j
- log4j
-
-
- org.slf4j
- slf4j-api
-
-
- org.slf4j
- slf4j-log4j12
-
-
- redis.clients
- jedis
-
-
- javax.validation
- validation-api
-
-
- org.hibernate
- hibernate-validator
-
-
- javax.cache
- cache-api
-
-
- org.apache.velocity
- velocity
-
-
-
-
-
- org.mortbay.jetty
- maven-jetty-plugin
- ${jetty_version}
-
- /
- 10
-
-
- 8080
- 60000
-
-
-
-
-
-
-
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/PageContext.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/PageContext.java
deleted file mode 100644
index de81ceeaf3..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/PageContext.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance;
-
-import com.alibaba.dubbo.registry.common.domain.User;
-
-import java.util.Map;
-
-/**
- * Context
- *
- */
-public interface PageContext {
-
- public String get(String key);
-
- public String[] gets(String key);
-
- public Map getAll();
-
- public void put(String key, Object value);
-
- public String getMessage(String key, Object... args);
-
- public String getClientAddress();
-
- public String getOperateAddress();
-
- public String getRegistryAddress();
-
- public String getURI();
-
- public String getURL();
-
- public String getReferer();
-
- public User getLoginUser();
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/biz/common/i18n/MessageResourceService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/biz/common/i18n/MessageResourceService.java
deleted file mode 100644
index bb4c6f18b2..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/biz/common/i18n/MessageResourceService.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.biz.common.i18n;
-
-public interface MessageResourceService {
-
- public String get(String key, Object... args);
-
- public String getMessage(String key, Object... args);
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/biz/common/i18n/impl/MessageResourceServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/biz/common/i18n/impl/MessageResourceServiceImpl.java
deleted file mode 100644
index 50168217fd..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/biz/common/i18n/impl/MessageResourceServiceImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.biz.common.i18n.impl;
-
-import com.alibaba.dubbo.governance.biz.common.i18n.MessageResourceService;
-import com.alibaba.dubbo.governance.web.common.i18n.LocaleUtil;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.MessageSource;
-import org.springframework.context.NoSuchMessageException;
-
-public class MessageResourceServiceImpl implements MessageResourceService {
-
- @Autowired
- private MessageSource messageSource;
-
- public void setMessageSource(MessageSource messageSource) {
- this.messageSource = messageSource;
- }
-
- public String get(String key, Object... args) {
- try {
- if (messageSource != null) {
- return messageSource.getMessage(key, args, key, LocaleUtil.getLocale());
- }
- return key;
- } catch (NoSuchMessageException e) {
- return key;
- }
- }
-
- public String getMessage(String key, Object... args) {
- return get(key, args);
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ConfigService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ConfigService.java
deleted file mode 100644
index b6e19317e9..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ConfigService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service;
-
-import com.alibaba.dubbo.registry.common.domain.Config;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * TODO Comment of ConfigDAO
- *
- */
-public interface ConfigService {
-
- void update(List configs);
-
- Map findAllConfigsMap();
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ConsumerService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ConsumerService.java
deleted file mode 100644
index e8c4da7a65..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ConsumerService.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service;
-
-import com.alibaba.dubbo.registry.common.domain.Consumer;
-
-import java.util.List;
-
-/**
- * Query service for consumer info
- *
- */
-public interface ConsumerService {
-
- List findByService(String serviceName);
-
- Consumer findConsumer(Long id);
-
- List findAll();
-
- /**
- * query for all consumer addresses
- */
- List findAddresses();
-
- List findAddressesByApplication(String application);
-
- List findAddressesByService(String serviceName);
-
- List findByAddress(String consumerAddress);
-
- List findServicesByAddress(String consumerAddress);
-
- List findApplications();
-
- List findApplicationsByServiceName(String serviceName);
-
- List findByApplication(String application);
-
- List findServicesByApplication(String application);
-
- List findServices();
-
-}
\ No newline at end of file
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/OverrideService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/OverrideService.java
deleted file mode 100644
index 371b523551..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/OverrideService.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service;
-
-import com.alibaba.dubbo.registry.common.domain.Override;
-
-import java.util.List;
-
-public interface OverrideService {
-
- void saveOverride(Override override);
-
- void updateOverride(Override override);
-
- void deleteOverride(Long id);
-
- void enableOverride(Long id);
-
- void disableOverride(Long id);
-
- List findByService(String service);
-
- List findByAddress(String address);
-
- List findByServiceAndAddress(String service, String address);
-
- List findByApplication(String application);
-
- List findByServiceAndApplication(String service, String application);
-
- List findAll();
-
- Override findById(Long id);
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/OwnerService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/OwnerService.java
deleted file mode 100644
index 2d47232edd..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/OwnerService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service;
-
-import com.alibaba.dubbo.registry.common.domain.Owner;
-
-import java.util.List;
-
-public interface OwnerService {
-
- List findAllServiceNames();
-
- List findServiceNamesByUsername(String username);
-
- List findUsernamesByServiceName(String serviceName);
-
- List findByService(String serviceName);
-
- List findAll();
-
- Owner findById(Long id);
-
- void saveOwner(Owner owner);
-
- void deleteOwner(Owner owner);
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ProviderService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ProviderService.java
deleted file mode 100644
index 4b4a8c72ba..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ProviderService.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service;
-
-import com.alibaba.dubbo.registry.common.domain.Provider;
-
-import java.util.List;
-
-/**
- * ProviderService
- *
- */
-public interface ProviderService {
-
- void create(Provider provider);
-
- void enableProvider(Long id);
-
- void disableProvider(Long id);
-
- void doublingProvider(Long id);
-
- void halvingProvider(Long id);
-
- void deleteStaticProvider(Long id);
-
- void updateProvider(Provider provider);
-
- Provider findProvider(Long id);
-
- List findServices();
-
- List findAddresses();
-
- List findAddressesByApplication(String application);
-
- List findAddressesByService(String serviceName);
-
- List findApplicationsByServiceName(String serviceName);
-
- List findByService(String serviceName);
-
- List findAll();
-
- List findByAddress(String providerAddress);
-
- List findServicesByAddress(String providerAddress);
-
- List findApplications();
-
- List findByApplication(String application);
-
- List findServicesByApplication(String application);
-
- List findMethodsByService(String serviceName);
-
- Provider findByServiceAndAddress(String service, String address);
-
-}
\ No newline at end of file
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/RouteService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/RouteService.java
deleted file mode 100644
index d6233e64ec..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/RouteService.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service;
-
-import com.alibaba.dubbo.registry.common.domain.Route;
-
-import java.util.List;
-
-/**
- * RouteService
- *
- */
-public interface RouteService {
-
- void createRoute(Route route);
-
- void updateRoute(Route route);
-
- void deleteRoute(Long id);
-
- void enableRoute(Long id);
-
- void disableRoute(Long id);
-
- Route findRoute(Long id);
-
- List findAll();
-
- List findByService(String serviceName);
-
- List findByAddress(String address);
-
- List findByServiceAndAddress(String service, String address);
-
- List findForceRouteByService(String service);
-
- List findForceRouteByAddress(String address);
-
- List findForceRouteByServiceAndAddress(String service, String address);
-
- List findAllForceRoute();
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/UserService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/UserService.java
deleted file mode 100644
index a4e66ccc3b..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/UserService.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service;
-
-import com.alibaba.dubbo.registry.common.domain.User;
-
-import java.util.List;
-
-/**
- * UserService
- *
- */
-public interface UserService {
-
- List findAllUsers();
-
- User findUser(String username);
-
- User findById(Long id);
-
- void createUser(User user);
-
- void updateUser(User user);
-
- void modifyUser(User user);
-
- boolean updatePassword(User user, String oldPassword);
-
- void resetPassword(User user);
-
- void enableUser(User user);
-
- void disableUser(User user);
-
- void deleteUser(User user);
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/AbstractService.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/AbstractService.java
deleted file mode 100644
index e7b037fbbd..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/AbstractService.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service.impl;
-
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.logger.Logger;
-import com.alibaba.dubbo.common.logger.LoggerFactory;
-import com.alibaba.dubbo.governance.sync.RegistryServerSync;
-import com.alibaba.dubbo.registry.RegistryService;
-
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * IbatisDAO
- *
- */
-public class AbstractService {
-
- protected static final Logger logger = LoggerFactory.getLogger(AbstractService.class);
- @Autowired
- protected RegistryService registryService;
- @Autowired
- private RegistryServerSync sync;
-
- public ConcurrentMap>> getRegistryCache() {
- return sync.getRegistryCache();
- }
-
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConfigServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConfigServiceImpl.java
deleted file mode 100644
index d31c5f59a6..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConfigServiceImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service.impl;
-
-import com.alibaba.dubbo.governance.service.ConfigService;
-import com.alibaba.dubbo.registry.common.domain.Config;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * TODO Comment of IbatisConfigDAO
- *
- */
-public class ConfigServiceImpl extends AbstractService implements ConfigService {
-
- /* (non-Javadoc)
- * @see com.alibaba.dubbo.governance.service.ConfigService#update(java.util.List)
- */
- public void update(List configs) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see com.alibaba.dubbo.governance.service.ConfigService#findAllConfigsMap()
- */
- public Map findAllConfigsMap() {
- // TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConsumerServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConsumerServiceImpl.java
deleted file mode 100644
index 061df39437..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConsumerServiceImpl.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service.impl;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.governance.service.ConsumerService;
-import com.alibaba.dubbo.governance.sync.util.Pair;
-import com.alibaba.dubbo.governance.sync.util.SyncUtils;
-import com.alibaba.dubbo.registry.common.domain.Consumer;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentMap;
-
-public class ConsumerServiceImpl extends AbstractService implements ConsumerService {
-
- public List findByService(String service) {
- return SyncUtils.url2ConsumerList(findConsumerUrlByService(service));
- }
-
- public Consumer findConsumer(Long id) {
- return SyncUtils.url2Consumer(findConsumerUrl(id));
- }
-
- private Pair findConsumerUrl(Long id) {
- return SyncUtils.filterFromCategory(getRegistryCache(), Constants.CONSUMERS_CATEGORY, id);
- }
-
- public List findAll() {
- return SyncUtils.url2ConsumerList(findAllConsumerUrl());
- }
-
- private Map findAllConsumerUrl() {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.CONSUMERS_CATEGORY);
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findAddresses() {
- List ret = new ArrayList();
- ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
- if (null == consumerUrls) return ret;
-
- for (Map.Entry> e1 : consumerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- String app = u.getAddress();
- if (app != null) ret.add(app);
- }
- }
-
- return ret;
- }
-
- public List findAddressesByApplication(String application) {
- List ret = new ArrayList();
- ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
-
- if(consumerUrls == null)
- return ret;
-
- for (Map.Entry> e1 : consumerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- if (application.equals(u.getParameter(Constants.APPLICATION_KEY))) {
- String addr = u.getAddress();
- if (addr != null) ret.add(addr);
- }
- }
- }
-
- return ret;
- }
-
- public List findAddressesByService(String service) {
- List ret = new ArrayList();
- ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
- if (null == consumerUrls) return ret;
-
- for (Map.Entry e2 : consumerUrls.get(service).entrySet()) {
- URL u = e2.getValue();
- String app = u.getAddress();
- if (app != null) ret.add(app);
- }
-
- return ret;
- }
-
- public List findByAddress(String consumerAddress) {
- return SyncUtils.url2ConsumerList(findConsumerUrlByAddress(consumerAddress));
- }
-
- public List findServicesByAddress(String address) {
- List ret = new ArrayList();
- ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
- if (consumerUrls == null || address == null || address.length() == 0) return ret;
-
- for (Map.Entry> e1 : consumerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- if (address.equals(u.getAddress())) {
- ret.add(e1.getKey());
- break;
- }
- }
- }
-
- return ret;
- }
-
- private Map findConsumerUrlByAddress(String address) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.CONSUMERS_CATEGORY);
- filter.put(SyncUtils.ADDRESS_FILTER_KEY, address);
-
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findApplications() {
- List ret = new ArrayList();
- ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
- if (consumerUrls == null) return ret;
-
- for (Map.Entry> e1 : consumerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- String app = u.getParameter(Constants.APPLICATION_KEY);
- if (app != null) ret.add(app);
- }
- }
-
- return ret;
- }
-
- public List findApplicationsByServiceName(String service) {
- List ret = new ArrayList();
- ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
- if (consumerUrls == null) return ret;
-
- Map value = consumerUrls.get(service);
- if (value == null) {
- return ret;
- }
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- String app = u.getParameter(Constants.APPLICATION_KEY);
- if (app != null) ret.add(app);
- }
-
- return ret;
- }
-
- public List findByApplication(String application) {
- return SyncUtils.url2ConsumerList(findConsumerUrlByApplication(application));
- }
-
- private Map findConsumerUrlByApplication(String application) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.CONSUMERS_CATEGORY);
- filter.put(Constants.APPLICATION_KEY, application);
-
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findServicesByApplication(String application) {
- List ret = new ArrayList();
- ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
- if (consumerUrls == null || application == null || application.length() == 0) return ret;
-
- for (Map.Entry> e1 : consumerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- if (application.equals(u.getParameter(Constants.APPLICATION_KEY))) {
- ret.add(e1.getKey());
- break;
- }
- }
- }
-
- return ret;
- }
-
- public List findServices() {
- List ret = new ArrayList();
- ConcurrentMap> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
- if (consumerUrls != null) ret.addAll(consumerUrls.keySet());
- return ret;
- }
-
- public Map findConsumerUrlByService(String service) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.CONSUMERS_CATEGORY);
- filter.put(SyncUtils.SERVICE_FILTER_KEY, service);
-
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/OverrideServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/OverrideServiceImpl.java
deleted file mode 100644
index 5a0a02bae3..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/OverrideServiceImpl.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service.impl;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.governance.service.OverrideService;
-import com.alibaba.dubbo.governance.sync.util.Pair;
-import com.alibaba.dubbo.governance.sync.util.SyncUtils;
-import com.alibaba.dubbo.registry.common.domain.Override;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * IbatisOverrideDAO.java
- *
- */
-public class OverrideServiceImpl extends AbstractService implements OverrideService {
-
- public void saveOverride(Override override) {
- URL url = getUrlFromOverride(override);
- registryService.register(url);
- }
-
- public void updateOverride(Override override) {
- Long id = override.getId();
- if (id == null) {
- throw new IllegalStateException("no override id");
- }
- URL oldOverride = findOverrideUrl(id);
- if (oldOverride == null) {
- throw new IllegalStateException("Route was changed!");
- }
- URL newOverride = getUrlFromOverride(override);
-
- registryService.unregister(oldOverride);
- registryService.register(newOverride);
-
- }
-
- public void deleteOverride(Long id) {
- URL oldOverride = findOverrideUrl(id);
- if (oldOverride == null) {
- throw new IllegalStateException("Route was changed!");
- }
- registryService.unregister(oldOverride);
- }
-
- public void enableOverride(Long id) {
- if (id == null) {
- throw new IllegalStateException("no override id");
- }
-
- URL oldOverride = findOverrideUrl(id);
- if (oldOverride == null) {
- throw new IllegalStateException("Override was changed!");
- }
- if (oldOverride.getParameter("enabled", true)) {
- return;
- }
-
- URL newOverride = oldOverride.addParameter("enabled", true);
- registryService.unregister(oldOverride);
- registryService.register(newOverride);
-
- }
-
- public void disableOverride(Long id) {
- if (id == null) {
- throw new IllegalStateException("no override id");
- }
-
- URL oldProvider = findOverrideUrl(id);
- if (oldProvider == null) {
- throw new IllegalStateException("Override was changed!");
- }
- if (!oldProvider.getParameter("enabled", true)) {
- return;
- }
-
- URL newProvider = oldProvider.addParameter("enabled", false);
- registryService.unregister(oldProvider);
- registryService.register(newProvider);
-
- }
-
- private Map findOverrideUrl(String service, String address, String application) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.CONFIGURATORS_CATEGORY);
- if (service != null && service.length() > 0) {
- filter.put(SyncUtils.SERVICE_FILTER_KEY, service);
- }
- if (address != null && address.length() > 0) {
- filter.put(SyncUtils.ADDRESS_FILTER_KEY, address);
- }
- if (application != null && application.length() > 0) {
- filter.put(Constants.APPLICATION_KEY, application);
- }
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findByAddress(String address) {
- return SyncUtils.url2OverrideList(findOverrideUrl(null, address, null));
- }
-
- public List findByServiceAndAddress(String service, String address) {
- return SyncUtils.url2OverrideList(findOverrideUrl(service, address, null));
- }
-
- public List findByApplication(String application) {
- return SyncUtils.url2OverrideList(findOverrideUrl(null, null, application));
- }
-
- public List findByService(String service) {
- return SyncUtils.url2OverrideList(findOverrideUrl(service, null, null));
- }
-
- public List findByServiceAndApplication(String service, String application) {
- return SyncUtils.url2OverrideList(findOverrideUrl(service, null, application));
- }
-
- public List findAll() {
- return SyncUtils.url2OverrideList(findOverrideUrl(null, null, null));
- }
-
- private Pair findOverrideUrlPair(Long id) {
- return SyncUtils.filterFromCategory(getRegistryCache(), Constants.CONFIGURATORS_CATEGORY, id);
- }
-
- public Override findById(Long id) {
- return SyncUtils.url2Override(findOverrideUrlPair(id));
- }
-
- private URL getUrlFromOverride(Override override) {
- return override.toUrl();
- /*Map params = ConvertUtil.serviceName2Map(override.getService());
- if(!params.containsKey(Constants.INTERFACE_KEY)) {
- throw new IllegalArgumentException("No interface info");
- }
- if(!params.containsKey(Constants.VERSION_KEY)) {
- throw new IllegalArgumentException("No version info");
- }
-
- boolean enabled = override.isEnabled();
- if(!enabled) {
- params.put("enabled", "false");
- }
- String application = override.getApplication();
- if(!StringUtils.isEmpty(application)) {
- params.put("application", application);
- }
- String address = override.getAddress();
- if(!StringUtils.isEmpty(address)) {
- params.put("address", address);
- }
-
- String overrideAddress = override.getOverrideAddress();
- if(StringUtils.isEmpty(overrideAddress)) {
- overrideAddress = "0.0.0.0";
- }
- params.put(Constants.CATEGORY_KEY, Constants.CONFIGURATORS_CATEGORY);
-
- URL url = new URL("override", overrideAddress, -1, params);
- url = url.addParameterString(override.getParams());
- return url;*/
- }
-
- URL findOverrideUrl(Long id) {
- return getUrlFromOverride(findById(id));
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/OwnerServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/OwnerServiceImpl.java
deleted file mode 100644
index 6819d0a11c..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/OwnerServiceImpl.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service.impl;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.utils.StringUtils;
-import com.alibaba.dubbo.governance.service.OverrideService;
-import com.alibaba.dubbo.governance.service.OwnerService;
-import com.alibaba.dubbo.governance.service.ProviderService;
-import com.alibaba.dubbo.registry.common.domain.Override;
-import com.alibaba.dubbo.registry.common.domain.Owner;
-import com.alibaba.dubbo.registry.common.domain.Provider;
-
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class OwnerServiceImpl extends AbstractService implements OwnerService {
-
- @Autowired
- ProviderService providerService;
-
- @Autowired
- OverrideService overrideService;
-
- public List findAllServiceNames() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List findServiceNamesByUsername(String username) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List findUsernamesByServiceName(String serviceName) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List findByService(String serviceName) {
- List pList = providerService.findByService(serviceName);
- List cList = overrideService.findByServiceAndAddress(serviceName, Constants.ANYHOST_VALUE);
- return toOverrideLiset(pList, cList);
- }
-
- public List findAll() {
- List pList = providerService.findAll();
- List cList = overrideService.findAll();
- return toOverrideLiset(pList, cList);
- }
-
- public Owner findById(Long id) {
-
- return null;
- }
-
- private List toOverrideLiset(List pList, List cList) {
- Map oList = new HashMap();
- for (Provider p : pList) {
- if (p.getUsername() != null) {
- for (String username : Constants.COMMA_SPLIT_PATTERN.split(p.getUsername())) {
- Owner o = new Owner();
- o.setService(p.getService());
- o.setUsername(username);
- oList.put(o.getService() + "/" + o.getUsername(), o);
- }
- }
- }
- for (Override c : cList) {
- Map params = StringUtils.parseQueryString(c.getParams());
- String usernames = params.get("owner");
- if (usernames != null && usernames.length() > 0) {
- for (String username : Constants.COMMA_SPLIT_PATTERN.split(usernames)) {
- Owner o = new Owner();
- o.setService(c.getService());
- o.setUsername(username);
- oList.put(o.getService() + "/" + o.getUsername(), o);
- }
- }
- }
- return new ArrayList(oList.values());
- }
-
- public void saveOwner(Owner owner) {
- List overrides = overrideService.findByServiceAndAddress(owner.getService(), Constants.ANYHOST_VALUE);
- if (overrides == null || overrides.size() == 0) {
- Override override = new Override();
- override.setAddress(Constants.ANYHOST_VALUE);
- override.setService(owner.getService());
- override.setEnabled(true);
- override.setParams("owner=" + owner.getUsername());
- overrideService.saveOverride(override);
- } else {
- for (Override override : overrides) {
- Map params = StringUtils.parseQueryString(override.getParams());
- String usernames = params.get("owner");
- if (usernames == null || usernames.length() == 0) {
- usernames = owner.getUsername();
- } else {
- usernames = usernames + "," + owner.getUsername();
- }
- params.put("owner", usernames);
- override.setParams(StringUtils.toQueryString(params));
- overrideService.updateOverride(override);
- }
- }
- }
-
- public void deleteOwner(Owner owner) {
- List overrides = overrideService.findByServiceAndAddress(owner.getService(), Constants.ANYHOST_VALUE);
- if (overrides == null || overrides.size() == 0) {
- Override override = new Override();
- override.setAddress(Constants.ANYHOST_VALUE);
- override.setService(owner.getService());
- override.setEnabled(true);
- override.setParams("owner=" + owner.getUsername());
- overrideService.saveOverride(override);
- } else {
- for (Override override : overrides) {
- Map params = StringUtils.parseQueryString(override.getParams());
- String usernames = params.get("owner");
- if (usernames != null && usernames.length() > 0) {
- if (usernames.equals(owner.getUsername())) {
- params.remove("owner");
- } else {
- usernames = usernames.replace(owner.getUsername() + ",", "").replace("," + owner.getUsername(), "");
- params.put("owner", usernames);
- }
- if (params.size() > 0) {
- override.setParams(StringUtils.toQueryString(params));
- overrideService.updateOverride(override);
- } else {
- overrideService.deleteOverride(override.getId());
- }
- }
- }
- }
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ProviderServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ProviderServiceImpl.java
deleted file mode 100644
index b08814333b..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ProviderServiceImpl.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service.impl;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.utils.StringUtils;
-import com.alibaba.dubbo.governance.service.OverrideService;
-import com.alibaba.dubbo.governance.service.ProviderService;
-import com.alibaba.dubbo.governance.sync.util.Pair;
-import com.alibaba.dubbo.governance.sync.util.SyncUtils;
-import com.alibaba.dubbo.registry.common.domain.Override;
-import com.alibaba.dubbo.registry.common.domain.Provider;
-import com.alibaba.dubbo.registry.common.route.ParseUtils;
-
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * IbatisProviderService
- *
- */
-public class ProviderServiceImpl extends AbstractService implements ProviderService {
-
- @Autowired
- OverrideService overrideService;
-
- public void create(Provider provider) {
- URL url = provider.toUrl();
- registryService.register(url);
- }
-
- public void enableProvider(Long id) {
- if (id == null) {
- throw new IllegalStateException("no provider id");
- }
-
- Provider oldProvider = findProvider(id);
-
- if (oldProvider == null) {
- throw new IllegalStateException("Provider was changed!");
- }
- if (oldProvider.isDynamic()) {
- // Make sure we only have one override configured disable property.
- if (!oldProvider.isEnabled()) {
- Override override = new Override();
- override.setAddress(oldProvider.getAddress());
- override.setService(oldProvider.getService());
- override.setEnabled(true);
- override.setParams(Constants.DISABLED_KEY + "=false");
- overrideService.saveOverride(override);
- return;
- }
- List oList = overrideService.findByServiceAndAddress(oldProvider.getService(), oldProvider.getAddress());
-
- for (Override o : oList) {
- Map params = StringUtils.parseQueryString(o.getParams());
- if (params.containsKey(Constants.DISABLED_KEY)) {
- if (params.get(Constants.DISABLED_KEY).equals("true")) {
- overrideService.deleteOverride(o.getId());
- }
- }
- }
- } else {
- oldProvider.setEnabled(true);
- updateProvider(oldProvider);
- }
- }
-
- public void disableProvider(Long id) {
- if (id == null) {
- throw new IllegalStateException("no provider id");
- }
-
- Provider oldProvider = findProvider(id);
- if (oldProvider == null) {
- throw new IllegalStateException("Provider was changed!");
- }
-
- if (oldProvider.isDynamic()) {
- // Make sure we only have one override configured disable property.
- if (oldProvider.isEnabled()) {
- Override override = new Override();
- override.setAddress(oldProvider.getAddress());
- override.setService(oldProvider.getService());
- override.setEnabled(true);
- override.setParams(Constants.DISABLED_KEY + "=true");
- overrideService.saveOverride(override);
- return;
- }
- List oList = overrideService.findByServiceAndAddress(oldProvider.getService(), oldProvider.getAddress());
-
- for (Override o : oList) {
- Map params = StringUtils.parseQueryString(o.getParams());
- if (params.containsKey(Constants.DISABLED_KEY)) {
- if (params.get(Constants.DISABLED_KEY).equals("false")) {
- overrideService.deleteOverride(o.getId());
- }
- }
- }
- } else {
- oldProvider.setEnabled(false);
- updateProvider(oldProvider);
- }
-
- }
-
- public void doublingProvider(Long id) {
- setWeight(id, 2F);
- }
-
- public void halvingProvider(Long id) {
- setWeight(id, 0.5F);
- }
-
- public void setWeight(Long id, float factor) {
- if (id == null) {
- throw new IllegalStateException("no provider id");
- }
- Provider oldProvider = findProvider(id);
- if (oldProvider == null) {
- throw new IllegalStateException("Provider was changed!");
- }
- Map map = StringUtils.parseQueryString(oldProvider.getParameters());
- String weight = map.get(Constants.WEIGHT_KEY);
- if (oldProvider.isDynamic()) {
- // Make sure we only have one override configured disable property.
- List overrides = overrideService.findByServiceAndAddress(oldProvider.getService(), oldProvider.getAddress());
- if (overrides == null || overrides.size() == 0) {
- int value = getWeight(weight, factor);
- if (value != Constants.DEFAULT_WEIGHT) {
- Override override = new Override();
- override.setAddress(oldProvider.getAddress());
- override.setService(oldProvider.getService());
- override.setEnabled(true);
- override.setParams(Constants.WEIGHT_KEY + "=" + String.valueOf(value));
- overrideService.saveOverride(override);
- }
- } else {
- for (Override override : overrides) {
- Map params = StringUtils.parseQueryString(override.getParams());
- String overrideWeight = params.get(Constants.WEIGHT_KEY);
- if (overrideWeight == null || overrideWeight.length() == 0) {
- overrideWeight = weight;
- }
- int value = getWeight(overrideWeight, factor);
- if (value == getWeight(weight, 1)) {
- params.remove(Constants.WEIGHT_KEY);
- } else {
- params.put(Constants.WEIGHT_KEY, String.valueOf(value));
- }
- if (params.size() > 0) {
- override.setParams(StringUtils.toQueryString(params));
- overrideService.updateOverride(override);
- } else {
- overrideService.deleteOverride(override.getId());
- }
- }
- }
- } else {
- int value = getWeight(weight, factor);
- if (value == Constants.DEFAULT_WEIGHT) {
- map.remove(Constants.WEIGHT_KEY);
- } else {
- map.put(Constants.WEIGHT_KEY, String.valueOf(value));
- }
- oldProvider.setParameters(StringUtils.toQueryString(map));
- updateProvider(oldProvider);
- }
- }
-
- private int getWeight(String value, float factor) {
- int weight = 100;
- if (value != null && value.length() > 0) {
- weight = Integer.parseInt(value);
- }
- weight = (int) (weight * factor);
- if (weight < 1) weight = 1;
- if (weight == 2) weight = 3;
- if (weight == 24) weight = 25;
- return weight;
- }
-
- public void deleteStaticProvider(Long id) {
- URL oldProvider = findProviderUrl(id);
- if (oldProvider == null) {
- throw new IllegalStateException("Provider was changed!");
- }
- registryService.unregister(oldProvider);
- }
-
- public void updateProvider(Provider provider) {
- Long id = provider.getId();
- if (id == null) {
- throw new IllegalStateException("no provider id");
- }
-
- URL oldProvider = findProviderUrl(id);
- if (oldProvider == null) {
- throw new IllegalStateException("Provider was changed!");
- }
- URL newProvider = provider.toUrl();
-
- registryService.unregister(oldProvider);
- registryService.register(newProvider);
- }
-
- public Provider findProvider(Long id) {
- return SyncUtils.url2Provider(findProviderUrlPair(id));
- }
-
- public Pair findProviderUrlPair(Long id) {
- return SyncUtils.filterFromCategory(getRegistryCache(), Constants.PROVIDERS_CATEGORY, id);
- }
-
- public List findServices() {
- List ret = new ArrayList();
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- if (providerUrls != null) ret.addAll(providerUrls.keySet());
- return ret;
- }
-
- public List findAddresses() {
- List ret = new ArrayList();
-
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- if (null == providerUrls) return ret;
-
- for (Map.Entry> e1 : providerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- String app = u.getAddress();
- if (app != null) ret.add(app);
- }
- }
-
- return ret;
- }
-
- public List findAddressesByApplication(String application) {
- List ret = new ArrayList();
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- for (Map.Entry> e1 : providerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- if (application.equals(u.getParameter(Constants.APPLICATION_KEY))) {
- String addr = u.getAddress();
- if (addr != null) ret.add(addr);
- }
- }
- }
-
- return ret;
- }
-
- public List findAddressesByService(String service) {
- List ret = new ArrayList();
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- if (null == providerUrls) return ret;
-
- for (Map.Entry e2 : providerUrls.get(service).entrySet()) {
- URL u = e2.getValue();
- String app = u.getAddress();
- if (app != null) ret.add(app);
- }
-
- return ret;
- }
-
- public List findApplicationsByServiceName(String service) {
- List ret = new ArrayList();
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- if (null == providerUrls) return ret;
-
- Map value = providerUrls.get(service);
- if (value == null) {
- return ret;
- }
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- String app = u.getParameter(Constants.APPLICATION_KEY);
- if (app != null) ret.add(app);
- }
-
- return ret;
- }
-
- public List findByService(String serviceName) {
- return SyncUtils.url2ProviderList(findProviderUrlByService(serviceName));
- }
-
- private Map findProviderUrlByService(String service) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.PROVIDERS_CATEGORY);
- filter.put(SyncUtils.SERVICE_FILTER_KEY, service);
-
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findAll() {
- return SyncUtils.url2ProviderList(findAllProviderUrl());
- }
-
- private Map findAllProviderUrl() {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.PROVIDERS_CATEGORY);
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findByAddress(String providerAddress) {
- return SyncUtils.url2ProviderList(findProviderUrlByAddress(providerAddress));
- }
-
- public Map findProviderUrlByAddress(String address) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.PROVIDERS_CATEGORY);
- filter.put(SyncUtils.ADDRESS_FILTER_KEY, address);
-
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findServicesByAddress(String address) {
- List ret = new ArrayList();
-
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- if (providerUrls == null || address == null || address.length() == 0) return ret;
-
- for (Map.Entry> e1 : providerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- if (address.equals(u.getAddress())) {
- ret.add(e1.getKey());
- break;
- }
- }
- }
-
- return ret;
- }
-
- public List findApplications() {
- List ret = new ArrayList();
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- if (providerUrls == null) return ret;
-
- for (Map.Entry> e1 : providerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- String app = u.getParameter(Constants.APPLICATION_KEY);
- if (app != null) ret.add(app);
- }
- }
-
- return ret;
- }
-
- public List findByApplication(String application) {
- return SyncUtils.url2ProviderList(findProviderUrlByApplication(application));
- }
-
- private Map findProviderUrlByApplication(String application) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.PROVIDERS_CATEGORY);
- filter.put(Constants.APPLICATION_KEY, application);
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findServicesByApplication(String application) {
- List ret = new ArrayList();
-
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- if (providerUrls == null || application == null || application.length() == 0) return ret;
-
- for (Map.Entry> e1 : providerUrls.entrySet()) {
- Map value = e1.getValue();
- for (Map.Entry e2 : value.entrySet()) {
- URL u = e2.getValue();
- if (application.equals(u.getParameter(Constants.APPLICATION_KEY))) {
- ret.add(e1.getKey());
- break;
- }
- }
- }
-
- return ret;
- }
-
- public List findMethodsByService(String service) {
- List ret = new ArrayList();
-
- ConcurrentMap> providerUrls = getRegistryCache().get(Constants.PROVIDERS_CATEGORY);
- if (providerUrls == null || service == null || service.length() == 0) return ret;
-
- Map providers = providerUrls.get(service);
- if (null == providers || providers.isEmpty()) return ret;
-
- Entry p = providers.entrySet().iterator().next();
- String value = p.getValue().getParameter("methods");
- if (value == null || value.length() == 0) {
- return ret;
- }
- String[] methods = value.split(ParseUtils.METHOD_SPLIT);
- if (methods == null || methods.length == 0) {
- return ret;
- }
-
- for (String m : methods) {
- ret.add(m);
- }
- return ret;
- }
-
- private URL findProviderUrl(Long id) {
- return findProvider(id).toUrl();
- }
-
- public Provider findByServiceAndAddress(String service, String address) {
- return SyncUtils.url2Provider(findProviderUrl(service, address));
- }
-
- private Pair findProviderUrl(String service, String address) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.PROVIDERS_CATEGORY);
- filter.put(SyncUtils.ADDRESS_FILTER_KEY, address);
-
- Map ret = SyncUtils.filterFromCategory(getRegistryCache(), filter);
- if (ret.isEmpty()) {
- return null;
- } else {
- Long key = ret.entrySet().iterator().next().getKey();
- return new Pair(key, ret.get(key));
- }
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/RouteServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/RouteServiceImpl.java
deleted file mode 100644
index 6b87cea78e..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/RouteServiceImpl.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service.impl;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.governance.service.RouteService;
-import com.alibaba.dubbo.governance.sync.util.Pair;
-import com.alibaba.dubbo.governance.sync.util.SyncUtils;
-import com.alibaba.dubbo.registry.common.domain.Route;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * IbatisRouteService
- *
- */
-public class RouteServiceImpl extends AbstractService implements RouteService {
-
- public void createRoute(Route route) {
- registryService.register(route.toUrl());
- }
-
- public void updateRoute(Route route) {
- Long id = route.getId();
- if (id == null) {
- throw new IllegalStateException("no route id");
- }
- URL oldRoute = findRouteUrl(id);
- if (oldRoute == null) {
- throw new IllegalStateException("Route was changed!");
- }
-
- registryService.unregister(oldRoute);
- registryService.register(route.toUrl());
- }
-
- public void deleteRoute(Long id) {
- URL oldRoute = findRouteUrl(id);
- if (oldRoute == null) {
- throw new IllegalStateException("Route was changed!");
- }
- registryService.unregister(oldRoute);
- }
-
- public void enableRoute(Long id) {
- if (id == null) {
- throw new IllegalStateException("no route id");
- }
-
- URL oldRoute = findRouteUrl(id);
- if (oldRoute == null) {
- throw new IllegalStateException("Route was changed!");
- }
- if (oldRoute.getParameter("enabled", true)) {
- return;
- }
-
- registryService.unregister(oldRoute);
- URL newRoute = oldRoute.addParameter("enabled", true);
- registryService.register(newRoute);
-
- }
-
- public void disableRoute(Long id) {
- if (id == null) {
- throw new IllegalStateException("no route id");
- }
-
- URL oldRoute = findRouteUrl(id);
- if (oldRoute == null) {
- throw new IllegalStateException("Route was changed!");
- }
- if (!oldRoute.getParameter("enabled", true)) {
- return;
- }
-
- URL newRoute = oldRoute.addParameter("enabled", false);
- registryService.unregister(oldRoute);
- registryService.register(newRoute);
-
- }
-
- public List findAll() {
- return SyncUtils.url2RouteList(findAllUrl());
- }
-
- private Map findAllUrl() {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.ROUTERS_CATEGORY);
-
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public Route findRoute(Long id) {
- return SyncUtils.url2Route(findRouteUrlPair(id));
- }
-
- public Pair findRouteUrlPair(Long id) {
- return SyncUtils.filterFromCategory(getRegistryCache(), Constants.ROUTERS_CATEGORY, id);
- }
-
- private URL findRouteUrl(Long id) {
- return findRoute(id).toUrl();
- }
-
- private Map findRouteUrl(String service, String address, boolean force) {
- Map filter = new HashMap();
- filter.put(Constants.CATEGORY_KEY, Constants.ROUTERS_CATEGORY);
- if (service != null && service.length() > 0) {
- filter.put(SyncUtils.SERVICE_FILTER_KEY, service);
- }
- if (address != null && address.length() > 0) {
- filter.put(SyncUtils.ADDRESS_FILTER_KEY, address);
- }
- if (force) {
- filter.put("force", "true");
- }
- return SyncUtils.filterFromCategory(getRegistryCache(), filter);
- }
-
- public List findByService(String serviceName) {
- return SyncUtils.url2RouteList(findRouteUrl(serviceName, null, false));
- }
-
- public List findByAddress(String address) {
- return SyncUtils.url2RouteList(findRouteUrl(null, address, false));
- }
-
- public List findByServiceAndAddress(String service, String address) {
- return SyncUtils.url2RouteList(findRouteUrl(service, address, false));
- }
-
- public List findForceRouteByService(String service) {
- return SyncUtils.url2RouteList(findRouteUrl(service, null, true));
- }
-
- public List findForceRouteByAddress(String address) {
- return SyncUtils.url2RouteList(findRouteUrl(null, address, true));
- }
-
- public List findForceRouteByServiceAndAddress(String service, String address) {
- return SyncUtils.url2RouteList(findRouteUrl(service, address, true));
- }
-
- public List findAllForceRoute() {
- return SyncUtils.url2RouteList(findRouteUrl(null, null, true));
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/UserServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/UserServiceImpl.java
deleted file mode 100644
index d4bf0620f8..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/UserServiceImpl.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.service.impl;
-
-import com.alibaba.dubbo.governance.service.UserService;
-import com.alibaba.dubbo.registry.common.domain.User;
-import com.alibaba.dubbo.registry.common.util.Coder;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * IBatisUserService
- *
- */
-public class UserServiceImpl extends AbstractService implements UserService {
-
- private String rootPassword;
- private String guestPassword;
-
- public void setRootPassword(String password) {
- this.rootPassword = (password == null ? "" : password);
- }
-
- public void setGuestPassword(String password) {
- this.guestPassword = (password == null ? "" : password);
- }
-
- public User findUser(String username) {
- if ("guest".equals(username)) {
- User user = new User();
- user.setUsername(username);
- user.setPassword(Coder.encodeMd5(username + ":" + User.REALM + ":" + guestPassword));
- user.setName(username);
- user.setRole(User.GUEST);
- user.setEnabled(true);
- user.setLocale("zh");
- user.setServicePrivilege("");
- return user;
- } else if ("root".equals(username)) {
- User user = new User();
- user.setUsername(username);
- user.setPassword(Coder.encodeMd5(username + ":" + User.REALM + ":" + rootPassword));
- user.setName(username);
- user.setRole(User.ROOT);
- user.setEnabled(true);
- user.setLocale("zh");
- user.setServicePrivilege("*");
- return user;
- }
- return null;
- }
-
- public List findAllUsers() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Map findAllUsersMap() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public User findById(Long id) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void createUser(User user) {
- // TODO Auto-generated method stub
-
- }
-
- public void updateUser(User user) {
- // TODO Auto-generated method stub
-
- }
-
- public void modifyUser(User user) {
- // TODO Auto-generated method stub
-
- }
-
- public boolean updatePassword(User user, String oldPassword) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void resetPassword(User user) {
- // TODO Auto-generated method stub
-
- }
-
- public void enableUser(User user) {
- // TODO Auto-generated method stub
-
- }
-
- public void disableUser(User user) {
- // TODO Auto-generated method stub
-
- }
-
- public void deleteUser(User user) {
- // TODO Auto-generated method stub
-
- }
-
- public List findUsersByServiceName(String serviceName) {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/DatabaseStatusChecker.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/DatabaseStatusChecker.java
deleted file mode 100644
index 0d037196ba..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/DatabaseStatusChecker.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.status;
-
-import com.alibaba.dubbo.common.logger.Logger;
-import com.alibaba.dubbo.common.logger.LoggerFactory;
-import com.alibaba.dubbo.common.status.Status;
-import com.alibaba.dubbo.common.status.StatusChecker;
-
-import org.springframework.beans.factory.annotation.Autowired;
-
-import javax.sql.DataSource;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-
-/**
- * DatabaseStatus
- *
- */
-public class DatabaseStatusChecker implements StatusChecker {
-
- private static final Logger logger = LoggerFactory.getLogger(DatabaseStatusChecker.class);
-
- private int version;
-
- private String message;
-
- @Autowired
- private DataSource dataSource;
-
- public void setDataSource(DataSource dataSource) {
- this.dataSource = dataSource;
- check(); // init
- }
-
- public Status check() {
- boolean ok;
- try {
- Connection connection = dataSource.getConnection();
- try {
- DatabaseMetaData metaData = connection.getMetaData();
- ResultSet resultSet = metaData.getTypeInfo();
- try {
- ok = resultSet.next();
- } finally {
- resultSet.close();
- }
- if (message == null) {
- message = metaData.getURL()
- + " (" + metaData.getDatabaseProductName()
- + " " + metaData.getDatabaseProductVersion()
- + ", " + getIsolation(metaData.getDefaultTransactionIsolation()) + ")";
- }
- if (version == 0) {
- version = metaData.getDatabaseMajorVersion();
- }
- } finally {
- connection.close();
- }
- } catch (Throwable e) {
- logger.error(e.getMessage(), e);
- ok = false;
- }
- return new Status(!ok ? Status.Level.ERROR : (version < 5 ? Status.Level.WARN : Status.Level.OK), message);
- }
-
- private String getIsolation(int i) {
- if (i == Connection.TRANSACTION_READ_COMMITTED) {
- return "READ_COMMITTED";
- }
- if (i == Connection.TRANSACTION_READ_UNCOMMITTED) {
- return "READ_UNCOMMITTED";
- }
- if (i == Connection.TRANSACTION_REPEATABLE_READ) {
- return "REPEATABLE_READ";
- }
- if (i == Connection.TRANSACTION_SERIALIZABLE) {
- return "SERIALIZABLE)";
- }
- return "NONE";
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/LoadStatusChecker.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/LoadStatusChecker.java
deleted file mode 100644
index c9a4ff4a18..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/LoadStatusChecker.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.status;
-
-import com.alibaba.dubbo.common.status.Status;
-import com.alibaba.dubbo.common.status.StatusChecker;
-
-import java.lang.management.ManagementFactory;
-import java.lang.management.OperatingSystemMXBean;
-import java.lang.reflect.Method;
-
-/**
- * Load Status
- *
- */
-public class LoadStatusChecker implements StatusChecker {
-
- public Status check() {
- OperatingSystemMXBean operatingSystemMXBean = ManagementFactory.getOperatingSystemMXBean();
- double load;
- try {
- Method method = OperatingSystemMXBean.class.getMethod("getSystemLoadAverage", new Class>[0]);
- load = (Double) method.invoke(operatingSystemMXBean, new Object[0]);
- } catch (Throwable e) {
- load = -1;
- }
- int cpu = operatingSystemMXBean.getAvailableProcessors();
- return new Status(load < 0 ? Status.Level.UNKNOWN : (load < cpu ? Status.Level.OK : Status.Level.WARN), "Load: " + load + " / CPU: " + cpu);
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/MemoryStatusChecker.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/MemoryStatusChecker.java
deleted file mode 100644
index 087eed10b0..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/status/MemoryStatusChecker.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.status;
-
-import com.alibaba.dubbo.common.status.Status;
-import com.alibaba.dubbo.common.status.StatusChecker;
-
-/**
- * MemoryStatus
- *
- */
-public class MemoryStatusChecker implements StatusChecker {
-
- public Status check() {
- Runtime runtime = Runtime.getRuntime();
- long freeMemory = runtime.freeMemory();
- long totalMemory = runtime.totalMemory();
- long maxMemory = runtime.maxMemory();
- boolean ok = (maxMemory - (totalMemory - freeMemory) > 2048); // Alarm when spare memory < 2M
- String msg = "Max:" + (maxMemory / 1024 / 1024) + "M, Total:"
- + (totalMemory / 1024 / 1024) + "M, Free:" + (freeMemory / 1024 / 1024)
- + "M, Use:" + ((totalMemory / 1024 / 1024) - (freeMemory / 1024 / 1024)) + "M";
- return new Status(ok ? Status.Level.OK : Status.Level.WARN, msg);
- }
-
-}
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/sync/RegistryServerSync.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/sync/RegistryServerSync.java
deleted file mode 100644
index 29603e943f..0000000000
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/sync/RegistryServerSync.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * 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 com.alibaba.dubbo.governance.sync;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.logger.Logger;
-import com.alibaba.dubbo.common.logger.LoggerFactory;
-import com.alibaba.dubbo.common.utils.NetUtils;
-import com.alibaba.dubbo.common.utils.StringUtils;
-import com.alibaba.dubbo.governance.web.common.pulltool.Tool;
-import com.alibaba.dubbo.registry.NotifyListener;
-import com.alibaba.dubbo.registry.RegistryService;
-
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicLong;
-
-public class RegistryServerSync implements InitializingBean, DisposableBean, NotifyListener {
-
- private static final Logger logger = LoggerFactory.getLogger(RegistryServerSync.class);
-
- private static final URL SUBSCRIBE = new URL(Constants.ADMIN_PROTOCOL, NetUtils.getLocalHost(), 0, "",
- Constants.INTERFACE_KEY, Constants.ANY_VALUE,
- Constants.GROUP_KEY, Constants.ANY_VALUE,
- Constants.VERSION_KEY, Constants.ANY_VALUE,
- Constants.CLASSIFIER_KEY, Constants.ANY_VALUE,
- Constants.CATEGORY_KEY, Constants.PROVIDERS_CATEGORY + ","
- + Constants.CONSUMERS_CATEGORY + ","
- + Constants.ROUTERS_CATEGORY + ","
- + Constants.CONFIGURATORS_CATEGORY,
- Constants.ENABLED_KEY, Constants.ANY_VALUE,
- Constants.CHECK_KEY, String.valueOf(false));
-
- private static final AtomicLong ID = new AtomicLong();
-
- /**
- * Make sure ID never changed when the same url notified many times
- */
- private final ConcurrentHashMap URL_IDS_MAPPER = new ConcurrentHashMap