19 |
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 | dubbo.log
12 |
13 | %d %-5level %logger{36} - %msg%n
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/dubbo-registry/dubbo-registry-api/src/test/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 | dubbo.log
12 |
13 | %d %-5level %logger{36} - %msg%n
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/test/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 | dubbo.log
12 |
13 | %d %-5level %logger{36} - %msg%n
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-netty/src/test/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 | dubbo.log
12 |
13 | %d %-5level %logger{36} - %msg%n
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/dubbo-simple/dubbo-monitor-simple/src/test/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 | dubbo.log
12 |
13 | %d %-5level %logger{36} - %msg%n
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/dubbo-container/dubbo-container-spring/src/test/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | %d %-5level %logger{36} - %msg%n
7 |
8 |
9 |
10 |
11 | dubbo.log
12 |
13 | %d %-5level %logger{36} - %msg%n
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/dubbo-admin/src/test/resources/RouteData.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-api/src/test/java/com/alibaba/dubbo/rpc/proxy/Type.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.proxy;
17 |
18 | public enum Type
19 | {
20 | High, Normal, Lower
21 | }
--------------------------------------------------------------------------------
/dubbo-simple/dubbo-monitor-simple/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.container.page.PageHandler:
--------------------------------------------------------------------------------
1 | services=com.alibaba.dubbo.monitor.simple.pages.ServicesPageHandler
2 | providers=com.alibaba.dubbo.monitor.simple.pages.ProvidersPageHandler
3 | consumers=com.alibaba.dubbo.monitor.simple.pages.ConsumersPageHandler
4 | statistics=com.alibaba.dubbo.monitor.simple.pages.StatisticsPageHandler
5 | charts=com.alibaba.dubbo.monitor.simple.pages.ChartsPageHandler
6 | applications=com.alibaba.dubbo.monitor.simple.pages.ApplicationsPageHandler
7 | dependencies=com.alibaba.dubbo.monitor.simple.pages.DependenciesPageHandler
8 | hosts=com.alibaba.dubbo.monitor.simple.pages.HostsPageHandler
9 | unregister=com.alibaba.dubbo.monitor.simple.pages.UnregisterPageHandler
10 | unsubscribe=com.alibaba.dubbo.monitor.simple.pages.UnsubscribePageHandler
--------------------------------------------------------------------------------
/dubbo-admin/src/test/resources/ConsumerData.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-api/src/test/java/com/alibaba/dubbo/rpc/support/Type.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.support;
17 |
18 | public enum Type
19 | {
20 | High, Normal, Lower
21 | }
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-injvm/src/test/java/com/alibaba/dubbo/rpc/protocol/injvm/Type.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.protocol.injvm;
17 |
18 | public enum Type
19 | {
20 | High, Normal, Lower
21 | }
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-api/src/test/java/com/alibaba/dubbo/rpc/support/IEcho.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.support;
17 |
18 | public interface IEcho {
19 | String echo(String e);
20 | }
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-injvm/src/test/java/com/alibaba/dubbo/rpc/protocol/injvm/IEcho.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.protocol.injvm;
17 |
18 | public interface IEcho {
19 | String echo(String e);
20 | }
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/registry/common/domain/Dependency.java:
--------------------------------------------------------------------------------
1 | package com.alibaba.dubbo.registry.common.domain;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Dependency implements Serializable {
6 |
7 | private static final long serialVersionUID = 8526869025719540547L;
8 |
9 | private String providerApplication;
10 |
11 | private String consumerApplication;
12 |
13 | public String getProviderApplication() {
14 | return providerApplication;
15 | }
16 |
17 | public void setProviderApplication(String providerApplication) {
18 | this.providerApplication = providerApplication;
19 | }
20 |
21 | public String getConsumerApplication() {
22 | return consumerApplication;
23 | }
24 |
25 | public void setConsumerApplication(String consumerApplication) {
26 | this.consumerApplication = consumerApplication;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-default/src/test/java/com/alibaba/dubbo/rpc/protocol/dubbo/support/Type.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.protocol.dubbo.support;
17 |
18 | public enum Type
19 | {
20 | High, Normal, Lower
21 | }
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/api/Box.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.config.api;
17 |
18 | /**
19 | * @author ding.lid
20 | */
21 | public interface Box {
22 |
23 | String getName();
24 |
25 | }
--------------------------------------------------------------------------------
/dubbo-admin/src/main/webapp/WEB-INF/templates/sysinfo/screen/versions/show.vm:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-api/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Filter:
--------------------------------------------------------------------------------
1 | echo=com.alibaba.dubbo.rpc.filter.EchoFilter
2 | generic=com.alibaba.dubbo.rpc.filter.GenericFilter
3 | genericimpl=com.alibaba.dubbo.rpc.filter.GenericImplFilter
4 | token=com.alibaba.dubbo.rpc.filter.TokenFilter
5 | accesslog=com.alibaba.dubbo.rpc.filter.AccessLogFilter
6 | activelimit=com.alibaba.dubbo.rpc.filter.ActiveLimitFilter
7 | classloader=com.alibaba.dubbo.rpc.filter.ClassLoaderFilter
8 | context=com.alibaba.dubbo.rpc.filter.ContextFilter
9 | consumercontext=com.alibaba.dubbo.rpc.filter.ConsumerContextFilter
10 | exception=com.alibaba.dubbo.rpc.filter.ExceptionFilter
11 | executelimit=com.alibaba.dubbo.rpc.filter.ExecuteLimitFilter
12 | deprecated=com.alibaba.dubbo.rpc.filter.DeprecatedFilter
13 | compatible=com.alibaba.dubbo.rpc.filter.CompatibleFilter
14 | timeout=com.alibaba.dubbo.rpc.filter.TimeoutFilter
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/model/AnimalEnum.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.model;
17 |
18 | /**
19 | * @author ding.lid
20 | *
21 | */
22 | public enum AnimalEnum {
23 | dog, cat, rat, cow, bull, horse;
24 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/model/person/PersonStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.model.person;
17 |
18 | /**
19 | * @author tony.chenl
20 | */
21 | public enum PersonStatus {
22 | ENABLED,
23 | DISABLED
24 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/utils/MyEnum.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.utils;
17 |
18 | /**
19 | * MyEnum
20 | *
21 | * @author william.liangf
22 | */
23 | public enum MyEnum {
24 |
25 | A, B
26 |
27 | }
--------------------------------------------------------------------------------
/dubbo-admin/src/main/webapp/WEB-INF/templates/sysinfo/screen/envs/index.vm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
$i18n.get("property.name"):
7 |
$i18n.get("property.value"):
8 |
9 | #foreach($entry in $properties.entrySet())
10 |
11 |
$i18n.get($entry.key)
12 |
$entry.value
13 |
14 | #end
15 |
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/registry/common/domain/SearchHistory.java:
--------------------------------------------------------------------------------
1 | package com.alibaba.dubbo.registry.common.domain;
2 |
3 | public class SearchHistory extends Entity {
4 |
5 | private static final long serialVersionUID = -1281982267153430266L;
6 |
7 | private String name;
8 |
9 | private String type;
10 |
11 | private String url;
12 |
13 | public SearchHistory() {
14 | }
15 |
16 | public SearchHistory(Long id) {
17 | super(id);
18 | }
19 |
20 | public String getName() {
21 | return name;
22 | }
23 |
24 | public void setName(String name) {
25 | this.name = name;
26 | }
27 |
28 | public String getType() {
29 | return type;
30 | }
31 |
32 | public void setType(String type) {
33 | this.type = type;
34 | }
35 |
36 | public String getUrl() {
37 | return url;
38 | }
39 |
40 | public void setUrl(String url) {
41 | this.url = url;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/api/Box.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.config.spring.api;
17 |
18 | /**
19 | * @author ding.lid
20 | */
21 | public interface Box {
22 |
23 | String getName();
24 |
25 | }
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/governance/module/screen/NoServicePrivilege.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Function:
3 | *
4 | * File Created at 2010-11-17
5 | * $Id: NoServicePrivilege.java 181192 2012-06-21 05:05:47Z tony.chenl $
6 | *
7 | * Copyright 2009 Alibaba.com Croporation Limited.
8 | * All rights reserved.
9 | */
10 | package com.alibaba.dubbo.governance.web.governance.module.screen;
11 |
12 | import javax.servlet.http.HttpServletRequest;
13 |
14 | import org.springframework.beans.factory.annotation.Autowired;
15 |
16 | import com.alibaba.citrus.turbine.Context;
17 |
18 | /**
19 | * TODO Comment of NoServicePrivilege
20 | *
21 | * @author guanghui.shigh
22 | */
23 | public class NoServicePrivilege {
24 |
25 | @Autowired
26 | private HttpServletRequest request;
27 |
28 | public void execute(Context context) {
29 | context.put("returnUrl", request.getParameter("returnUrl"));
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/sysmanage/module/screen/Privileges.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Project: dubbo.registry.console-2.1.0-SNAPSHOT
3 | *
4 | * File Created at Sep 13, 2011
5 | * $Id: Privileges.java 181192 2012-06-21 05:05:47Z tony.chenl $
6 | *
7 | * Copyright 1999-2100 Alibaba.com Corporation Limited.
8 | * All rights reserved.
9 | *
10 | * This software is the confidential and proprietary information of
11 | * Alibaba Company. ("Confidential Information"). You shall not
12 | * disclose such Confidential Information and shall use it only in
13 | * accordance with the terms of the license agreement you entered into
14 | * with Alibaba.com.
15 | */
16 | package com.alibaba.dubbo.governance.web.sysmanage.module.screen;
17 |
18 | import com.alibaba.dubbo.governance.web.common.module.screen.Restful;
19 |
20 | /**
21 | * @author ding.lid
22 | *
23 | */
24 | public class Privileges extends Restful {
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/filter/MockDao.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.config.spring.filter;
17 |
18 | /**
19 | * MockDao
20 | *
21 | * @author william.liangf
22 | */
23 | public interface MockDao {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/api/DemoServiceSon.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.config.spring.api;
17 |
18 | /**
19 | * DemoService
20 | *
21 | * @author ding.lid
22 | */
23 | public interface DemoServiceSon extends DemoService {
24 | // no methods
25 | }
--------------------------------------------------------------------------------
/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.bat:
--------------------------------------------------------------------------------
1 | @echo off & setlocal enabledelayedexpansion
2 |
3 | set LIB_JARS=""
4 | cd ..\lib
5 | for %%i in (*) do set LIB_JARS=!LIB_JARS!;..\lib\%%i
6 | cd ..\bin
7 |
8 | if ""%1"" == ""debug"" goto debug
9 | if ""%1"" == ""jmx"" goto jmx
10 |
11 | java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
12 | goto end
13 |
14 | :debug
15 | java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
16 | goto end
17 |
18 | :jmx
19 | java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
20 |
21 | :end
22 | pause
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/test/java/com/alibaba/dubbo/remoting/DemoService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.remoting;
17 |
18 | /**
19 | * TestService
20 | */
21 |
22 | public interface DemoService
23 | {
24 | void sayHello(String name);
25 |
26 | int plus(int a,int b);
27 | }
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-default/src/test/java/com/alibaba/dubbo/rpc/protocol/dubbo/support/NonSerialized.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.protocol.dubbo.support;
17 |
18 | /**
19 | * NonSerialized
20 | *
21 | * @author william.liangf
22 | */
23 | public class NonSerialized {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/hessian-lite/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | com.alibaba
8 | dubbo-parent
9 | 3.0.0-SNAPSHOT
10 |
11 | hessian-lite
12 | jar
13 | 3.2.1-fixed-2
14 | Hessian Lite(Alibaba embed version)
15 |
16 |
17 |
18 | junit
19 | junit
20 | 4.12
21 | test
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/filter/DemoService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.cluster.filter;
17 |
18 | /**
19 | * TestService
20 | */
21 |
22 | public interface DemoService
23 | {
24 | String sayHello(String name);
25 |
26 | int plus(int a,int b);
27 | }
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/common/auth/DubboUser.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Function: dubbo用户类
3 | *
4 | * File Created at 2011-08-17
5 | *
6 | * Copyright 2011 Alibaba.com Croporation Limited.
7 | * All rights reserved.
8 | */
9 | package com.alibaba.dubbo.governance.web.common.auth;
10 |
11 | import java.io.Serializable;
12 |
13 | import com.alibaba.dubbo.registry.common.domain.User;
14 |
15 | /**
16 | * MinasUser: DubboUser
17 | *
18 | * @author guanghui.shigh
19 | */
20 | public class DubboUser implements Serializable {
21 |
22 | private static final long serialVersionUID = 1L;
23 |
24 | private static final ThreadLocal userHolder = new ThreadLocal();
25 |
26 | private DubboUser() {
27 | }
28 |
29 | public static final User getCurrentUser() {
30 | return (User) userHolder.get();
31 | }
32 |
33 | public static final void setCurrentUser(User user) {
34 | userHolder.set(user);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/registry/common/domain/Favorite.java:
--------------------------------------------------------------------------------
1 | package com.alibaba.dubbo.registry.common.domain;
2 |
3 | public class Favorite extends Entity {
4 |
5 | private static final long serialVersionUID = -1281982267153430266L;
6 |
7 | private String name;
8 |
9 | private String url;
10 |
11 | private String username;
12 |
13 | public Favorite() {
14 | }
15 |
16 | public Favorite(Long id) {
17 | super(id);
18 | }
19 |
20 | public String getName() {
21 | return name;
22 | }
23 |
24 | public void setName(String name) {
25 | this.name = name;
26 | }
27 |
28 | public String getUrl() {
29 | return url;
30 | }
31 |
32 | public void setUrl(String url) {
33 | this.url = url;
34 | }
35 |
36 | public String getUsername() {
37 | return username;
38 | }
39 |
40 | public void setUsername(String username) {
41 | this.username = username;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/filter/MockDaoImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.config.spring.filter;
17 |
18 | /**
19 | * MockDaoImpl
20 | *
21 | * @author william.liangf
22 | */
23 | public class MockDaoImpl implements MockDao {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/api/HelloService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.alibaba.dubbo.config.spring.api;
18 |
19 | /**
20 | * @author kimi
21 | */
22 | public interface HelloService {
23 | String sayHello(String name);
24 | }
25 |
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/Decodeable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.alibaba.dubbo.remoting;
18 |
19 | /**
20 | * @author kimi
21 | */
22 | public interface Decodeable {
23 |
24 | public void decode() throws Exception;
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/cache/CacheService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.config.cache;
17 |
18 | /**
19 | * ValidationService
20 | *
21 | * @author william.liangf
22 | */
23 | public interface CacheService {
24 |
25 | String findCache(String id);
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/dubbo-simple/dubbo-monitor-simple/src/test/java/com/alibaba/dubbo/monitor/simple/SimpleMonitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.monitor.simple;
17 |
18 | public class SimpleMonitor {
19 |
20 | public static void main(String[] args) {
21 | com.alibaba.dubbo.container.Main.main(args);
22 | }
23 |
24 | }
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/registry/common/domain/Owner.java:
--------------------------------------------------------------------------------
1 | package com.alibaba.dubbo.registry.common.domain;
2 |
3 | public class Owner extends Entity {
4 |
5 | private static final long serialVersionUID = -4891350118145794727L;
6 |
7 | /**
8 | * 可以包含通配符。
9 | */
10 | private String service;
11 |
12 | private String username;
13 |
14 | private User user;
15 |
16 | public Owner() {
17 | }
18 |
19 | public Owner(Long id) {
20 | super(id);
21 | }
22 |
23 | public String getService() {
24 | return service;
25 | }
26 |
27 | public void setService(String service) {
28 | this.service = service;
29 | }
30 |
31 | public String getUsername() {
32 | return username;
33 | }
34 |
35 | public void setUsername(String username) {
36 | this.username = username;
37 | }
38 |
39 | public User getUser() {
40 | return user;
41 | }
42 |
43 | public void setUser(User user) {
44 | this.user = user;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/Merger.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.cluster;
17 |
18 | import com.alibaba.dubbo.common.extension.SPI;
19 |
20 | /**
21 | * @author kimi
22 | */
23 | @SPI
24 | public interface Merger {
25 |
26 | T merge(T... items);
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/dubbo-filter/dubbo-filter-cache/src/main/java/com/alibaba/dubbo/cache/Cache.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.cache;
17 |
18 | /**
19 | * Cache
20 | *
21 | * @author william.liangf
22 | */
23 | public interface Cache {
24 |
25 | void put(Object key, Object value);
26 |
27 | Object get(Object key);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/dubbo-admin/src/test/resources/ApprovalData.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
10 |
12 |
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/compiler/support/JdkCompilerTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.compiler.support;
17 |
18 | import org.junit.Test;
19 |
20 | /**
21 | * @author ding.lid
22 | */
23 | public class JdkCompilerTest {
24 | @Test
25 | public void test_compileProtocol() throws Exception {
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/api/DemoService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.config.spring.api;
17 |
18 | /**
19 | * DemoService
20 | *
21 | * @author william.liangf
22 | */
23 | public interface DemoService {
24 |
25 | String sayName(String name);
26 |
27 | Box getBox();
28 |
29 | }
--------------------------------------------------------------------------------
/dubbo-common/src/main/java/com/alibaba/dubbo/common/Resetable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common;
17 |
18 | /**
19 | * Resetable.
20 | *
21 | * @author william.liangf
22 | */
23 | public interface Resetable {
24 |
25 | /**
26 | * reset.
27 | *
28 | * @param url url
29 | */
30 | void reset(URL url);
31 |
32 | }
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-api/src/test/java/com/alibaba/dubbo/rpc/proxy/RemoteService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.proxy;
17 |
18 | import java.rmi.Remote;
19 | import java.rmi.RemoteException;
20 |
21 | public interface RemoteService extends Remote
22 | {
23 | String sayHello(String name) throws RemoteException;
24 |
25 | String getThreadName() throws RemoteException;
26 | }
--------------------------------------------------------------------------------
/dubbo-admin/src/main/webapp/WEB-INF/templates/governance/screen/noServicePrivilege.vm:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/dubbo-filter/dubbo-filter-validation/src/main/java/com/alibaba/dubbo/validation/Validator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.validation;
17 |
18 | /**
19 | * Validator
20 | *
21 | * @author william.liangf
22 | */
23 | public interface Validator {
24 |
25 | void validate(String methodName, Class>[] parameterTypes, Object[] arguments) throws Exception;
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/ChannelHandlerDelegate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.remoting.transport;
17 |
18 | import com.alibaba.dubbo.remoting.ChannelHandler;
19 |
20 | /**
21 | * @author chao.liuc
22 | */
23 | public interface ChannelHandlerDelegate extends ChannelHandler {
24 | public ChannelHandler getHandler();
25 | }
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/test/java/com/alibaba/dubbo/remoting/PerformanceClientMain.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.remoting;
17 |
18 |
19 | /**
20 | * PerformanceClientMain
21 | */
22 | public class PerformanceClientMain {
23 |
24 | public static void main(String[] args) throws Throwable {
25 | new PerformanceClientTest().testClient();
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/test/java/com/alibaba/dubbo/remoting/transport/codec/CodecAdapterTest.java:
--------------------------------------------------------------------------------
1 | package com.alibaba.dubbo.remoting.transport.codec;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.Before;
6 | import org.junit.Test;
7 |
8 | import com.alibaba.dubbo.common.URL;
9 | import com.alibaba.dubbo.common.io.UnsafeByteArrayInputStream;
10 | import com.alibaba.dubbo.remoting.Channel;
11 | import com.alibaba.dubbo.remoting.Codec;
12 | import com.alibaba.dubbo.remoting.buffer.ChannelBuffer;
13 | import com.alibaba.dubbo.remoting.buffer.ChannelBuffers;
14 | import com.alibaba.dubbo.remoting.codec.ExchangeCodecTest;
15 | import com.alibaba.dubbo.remoting.telnet.codec.TelnetCodec;
16 |
17 | import junit.framework.Assert;
18 |
19 | /**
20 | * @author kimi
21 | */
22 | public class CodecAdapterTest extends ExchangeCodecTest {
23 |
24 | @Before
25 | public void setUp() throws Exception {
26 | codec = new CodecAdapter(new DeprecatedExchangeCodec());
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/registry/common/domain/Cluster.java:
--------------------------------------------------------------------------------
1 | package com.alibaba.dubbo.registry.common.domain;
2 |
3 | public class Cluster extends Entity {
4 |
5 | private static final long serialVersionUID = 8704571999015097948L;
6 |
7 | private String name; /* 服务提供者分组名 ,一个分组可以包含若干个提供者*/
8 |
9 | private String address; /* 客户端地址 */
10 |
11 | private String username;
12 |
13 | public Cluster() {
14 | }
15 |
16 | public Cluster(Long id) {
17 | super(id);
18 | }
19 |
20 | public String getName() {
21 | return name;
22 | }
23 |
24 | public void setName(String name) {
25 | this.name = name;
26 | }
27 |
28 | public String getUsername() {
29 | return username;
30 | }
31 |
32 | public void setUsername(String username) {
33 | this.username = username;
34 | }
35 |
36 | public String getAddress() {
37 | return address;
38 | }
39 |
40 | public void setAddress(String address) {
41 | this.address = address;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/dubbo-admin/src/main/webapp/SpryAssets/SpryValidationRadio.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /* SpryValidationRadio.css - version 0.1 - Spry Pre-Release 1.6.1 */
4 |
5 | /* Copyright (c) 2007. Adobe Systems Incorporated. All rights reserved. */
6 |
7 |
8 | /* These are the classes applied on the messages
9 | * (required message and invalid value message )
10 | * which prevent them from being displayed by default.
11 | */
12 | .radioRequiredMsg, .radioInvalidMsg{
13 | display: none;
14 | }
15 |
16 | /* These selectors change the way messages look when the widget is in one of the error states.
17 | * These classes set a default red border and font color for the error text.
18 | * The state class (e.g. .radioRequiredState) is applied on the top-level container for the widget,
19 | * and this way only the specific error message can be shown by setting the display property to "inline".
20 | */
21 | .radioRequiredState .radioRequiredMsg,
22 | .radioInvalidState .radioInvalidMsg{
23 | display: inline;
24 | color: #CC3333;
25 | border: 1px solid #CC3333;
26 | }
27 |
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/model/BizException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.model;
17 |
18 | public class BizException extends RuntimeException{
19 |
20 | private static final long serialVersionUID = 1L;
21 |
22 | public BizException(String message){
23 | super(message);
24 | }
25 |
26 | public BizException() {
27 | }
28 | }
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/registry/MockRegistryFactory.java:
--------------------------------------------------------------------------------
1 | package com.alibaba.dubbo.config.spring.registry;
2 |
3 | import java.util.Collection;
4 | import java.util.HashMap;
5 | import java.util.Map;
6 |
7 | import com.alibaba.dubbo.common.URL;
8 | import com.alibaba.dubbo.registry.Registry;
9 | import com.alibaba.dubbo.registry.RegistryFactory;
10 |
11 | /**
12 | * @author kimi
13 | */
14 | public class MockRegistryFactory implements RegistryFactory {
15 |
16 | private static final Map registries = new HashMap();
17 |
18 | public Registry getRegistry(URL url) {
19 | MockRegistry registry = new MockRegistry(url);
20 | registries.put(url, registry);
21 | return registry;
22 | }
23 |
24 | public static Collection getCachedRegistry() {
25 | return registries.values();
26 | }
27 |
28 | public static void cleanCachedRegistry() {
29 | registries.clear();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/activate/ActivateExt1.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.alibaba.dubbo.common.extensionloader.activate;
18 |
19 | import com.alibaba.dubbo.common.extension.SPI;
20 |
21 | /**
22 | * @author kimi
23 | */
24 | @SPI("impl1")
25 | public interface ActivateExt1 {
26 | String echo(String msg);
27 | }
28 |
--------------------------------------------------------------------------------
/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/support/MenuService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.cluster.support;
17 |
18 | import java.util.List;
19 |
20 | /**
21 | * @author kimi
22 | */
23 | public interface MenuService {
24 |
25 | public Menu getMenu();
26 |
27 | public void addMenu( String menu, List items );
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/model/BizExceptionNoDefaultConstructor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.model;
17 |
18 | public class BizExceptionNoDefaultConstructor extends RuntimeException{
19 |
20 | private static final long serialVersionUID = 1L;
21 |
22 | public BizExceptionNoDefaultConstructor(String message){
23 | super(message);
24 | }
25 | }
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/ExchangeClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.remoting.exchange;
17 |
18 | import com.alibaba.dubbo.remoting.Client;
19 |
20 | /**
21 | * ExchangeClient. (API/SPI, Prototype, ThreadSafe)
22 | *
23 | * @author william.liangf
24 | */
25 | public interface ExchangeClient extends Client, ExchangeChannel {
26 |
27 | }
--------------------------------------------------------------------------------
/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/ConfigService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Project: dubbo.registry.server-1.1.0-SNAPSHOT
3 | *
4 | * File Created at 2010-6-30
5 | * $Id: ConfigService.java 181723 2012-06-26 01:56:06Z tony.chenl $
6 | *
7 | * Copyright 2008 Alibaba.com Croporation Limited.
8 | * All rights reserved.
9 | *
10 | * This software is the confidential and proprietary information of
11 | * Alibaba Company. ("Confidential Information"). You shall not
12 | * disclose such Confidential Information and shall use it only in
13 | * accordance with the terms of the license agreement you entered into
14 | * with Alibaba.com.
15 | */
16 | package com.alibaba.dubbo.governance.service;
17 |
18 | import java.util.List;
19 | import java.util.Map;
20 |
21 | import com.alibaba.dubbo.registry.common.domain.Config;
22 |
23 | /**
24 | * TODO Comment of ConfigDAO
25 | *
26 | * @author rain.chenjr
27 | *
28 | */
29 | public interface ConfigService {
30 |
31 | void update(List configs);
32 |
33 | Map findAllConfigsMap();
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/dubbo-admin/src/main/webapp/WEB-INF/templates/governance/screen/loadbalances/show.vm:
--------------------------------------------------------------------------------
1 |
6 |
7 |
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-default/src/test/java/com/alibaba/dubbo/rpc/protocol/dubbo/support/RemoteService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.protocol.dubbo.support;
17 |
18 | import java.rmi.Remote;
19 | import java.rmi.RemoteException;
20 |
21 | public interface RemoteService extends Remote
22 | {
23 | String sayHello(String name) throws RemoteException;
24 |
25 | String getThreadName() throws RemoteException;
26 | }
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/test/java/com/alibaba/dubbo/remoting/PerformanceServerMain.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.remoting;
17 |
18 | /**
19 | * PerformanceServerMain
20 | *
21 | * @author william.liangf
22 | */
23 | public class PerformanceServerMain{
24 |
25 | public static void main(String[] args) throws Exception {
26 | new PerformanceServerTest().testServer();
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/service/EchoService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.service;
17 |
18 | /**
19 | * Echo service.
20 | *
21 | * @author qian.lei
22 | * @export
23 | */
24 | public interface EchoService {
25 |
26 | /**
27 | * echo test.
28 | *
29 | * @param message message.
30 | * @return message.
31 | */
32 | Object $echo(Object message);
33 |
34 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext6_wrap/WrappedExt.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.extensionloader.ext6_wrap;
17 |
18 | import com.alibaba.dubbo.common.URL;
19 | import com.alibaba.dubbo.common.extension.SPI;
20 |
21 | /**
22 | * No Adaptive Method!!
23 | *
24 | * @author ding.lid
25 | */
26 | @SPI("impl1")
27 | public interface WrappedExt {
28 |
29 | String echo(URL url, String s);
30 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext5/NoAdaptiveMethodExt.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.extensionloader.ext5;
17 |
18 | import com.alibaba.dubbo.common.URL;
19 | import com.alibaba.dubbo.common.extension.SPI;
20 |
21 | /**
22 | * No Adaptive Method!!
23 | *
24 | * @author ding.lid
25 | */
26 | @SPI("impl1")
27 | public interface NoAdaptiveMethodExt {
28 | String echo(URL url, String s);
29 | }
--------------------------------------------------------------------------------
/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/ObjectOutput.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.serialize;
17 |
18 | import java.io.IOException;
19 |
20 | /**
21 | * Object output.
22 | *
23 | * @author qian.lei
24 | */
25 | public interface ObjectOutput extends DataOutput {
26 |
27 | /**
28 | * write object.
29 | *
30 | * @param obj object.
31 | */
32 | void writeObject(Object obj) throws IOException;
33 |
34 | }
--------------------------------------------------------------------------------
/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/stop.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd `dirname $0`
3 | BIN_DIR=`pwd`
4 | cd ..
5 | DEPLOY_DIR=`pwd`
6 | CONF_DIR=$DEPLOY_DIR/conf
7 |
8 | SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
9 |
10 | if [ -z "$SERVER_NAME" ]; then
11 | SERVER_NAME=`hostname`
12 | fi
13 |
14 | PIDS=`ps -f | grep java | grep "$CONF_DIR" |awk '{print $2}'`
15 | if [ -z "$PIDS" ]; then
16 | echo "ERROR: The $SERVER_NAME does not started!"
17 | exit 1
18 | fi
19 |
20 | if [ "$1" != "skip" ]; then
21 | $BIN_DIR/dump.sh
22 | fi
23 |
24 | echo -e "Stopping the $SERVER_NAME ...\c"
25 | for PID in $PIDS ; do
26 | kill $PID > /dev/null 2>&1
27 | done
28 |
29 | COUNT=0
30 | while [ $COUNT -lt 1 ]; do
31 | echo -e ".\c"
32 | sleep 1
33 | COUNT=1
34 | for PID in $PIDS ; do
35 | PID_EXIST=`ps -f -p $PID | grep java`
36 | if [ -n "$PID_EXIST" ]; then
37 | COUNT=0
38 | break
39 | fi
40 | done
41 | done
42 |
43 | echo "OK!"
44 | echo "PID: $PIDS"
45 |
--------------------------------------------------------------------------------
/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/filter/MockService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.cluster.filter;
17 |
18 | /**
19 | * MockService.java
20 | * @author tony.chenl
21 | */
22 | public class MockService implements DemoService{
23 | public String sayHello(String name) {
24 | return name;
25 | }
26 |
27 | public int plus(int a, int b) {
28 | return a+b;
29 | }
30 | }
--------------------------------------------------------------------------------
/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/Holder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.utils;
17 |
18 | /**
19 | * Helper Class for hold a value.
20 | *
21 | * @author william.liangf
22 | */
23 | public class Holder {
24 |
25 | private volatile T value;
26 |
27 | public void set(T value) {
28 | this.value = value;
29 | }
30 |
31 | public T get() {
32 | return value;
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/NoSpiExt.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.extensionloader;
17 |
18 | import com.alibaba.dubbo.common.URL;
19 | import com.alibaba.dubbo.common.extension.Adaptive;
20 | import com.alibaba.dubbo.common.extension.SPI;
21 |
22 | /**
23 | * 没有SPI注解。
24 | *
25 | * @author ding.lid
26 | */
27 | public interface NoSpiExt {
28 | @Adaptive
29 | String echo(URL url, String s);
30 | }
--------------------------------------------------------------------------------
/dubbo-remoting/dubbo-remoting-api/src/test/java/com/alibaba/dubbo/remoting/DemoServiceImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.remoting;
17 |
18 | /**
19 | * TestServiceImpl
20 | */
21 |
22 | public class DemoServiceImpl implements DemoService
23 | {
24 | public void sayHello(String name)
25 | {
26 | System.out.println("hello " + name);
27 | }
28 |
29 | public int plus(int a,int b)
30 | {
31 | return a + b;
32 | }
33 | }
--------------------------------------------------------------------------------
/dubbo-cluster/src/test/java/com/alibaba/dubbo/rpc/cluster/filter/DemoServiceMock.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc.cluster.filter;
17 |
18 | /**
19 | * MockService.java
20 | * @author tony.chenl
21 | */
22 | public class DemoServiceMock implements DemoService{
23 | public String sayHello(String name) {
24 | return name;
25 | }
26 |
27 | public int plus(int a, int b) {
28 | return a+b;
29 | }
30 | }
--------------------------------------------------------------------------------
/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/slf4j/Slf4jLoggerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.alibaba.dubbo.common.logger.slf4j;
2 |
3 | import java.io.File;
4 |
5 | import com.alibaba.dubbo.common.logger.Level;
6 | import com.alibaba.dubbo.common.logger.Logger;
7 | import com.alibaba.dubbo.common.logger.LoggerAdapter;
8 |
9 | public class Slf4jLoggerAdapter implements LoggerAdapter {
10 |
11 | public Logger getLogger(String key) {
12 | return new Slf4jLogger(org.slf4j.LoggerFactory.getLogger(key));
13 | }
14 |
15 | public Logger getLogger(Class> key) {
16 | return new Slf4jLogger(org.slf4j.LoggerFactory.getLogger(key));
17 | }
18 |
19 | private Level level;
20 |
21 | private File file;
22 |
23 | public void setLevel(Level level) {
24 | this.level = level;
25 | }
26 |
27 | public Level getLevel() {
28 | return level;
29 | }
30 |
31 | public File getFile() {
32 | return file;
33 | }
34 |
35 | public void setFile(File file) {
36 | this.file = file;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/dubbo/SimpleDO.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.serialize.dubbo;
17 |
18 | import java.io.Serializable;
19 |
20 | public class SimpleDO implements Serializable
21 | {
22 |
23 | private static final long serialVersionUID = 1L;
24 |
25 | public int a, b, c;
26 |
27 | float d = 1.2f, e = 12.56f;
28 |
29 | String str1 = "124", str2;
30 |
31 | public int str3;
32 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext7/impl/Ext7Impl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.extensionloader.ext7.impl;
17 |
18 | import com.alibaba.dubbo.common.URL;
19 | import com.alibaba.dubbo.common.extensionloader.ext7.InitErrorExt;
20 |
21 | /**
22 | * @author ding.lid
23 | */
24 | public class Ext7Impl implements InitErrorExt {
25 | public String echo(URL url, String s) {
26 | return "";
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.rpc;
17 |
18 | import com.alibaba.dubbo.common.Constants;
19 |
20 | /**
21 | * RpcConstants
22 | *
23 | * @deprecated Replace to com.alibaba.dubbo.common.Constants
24 | * @author william.liangf
25 | */
26 | @Deprecated
27 | public final class RpcConstants extends Constants {
28 |
29 | private RpcConstants() {}
30 |
31 | }
--------------------------------------------------------------------------------
/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/RuleConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2012 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.alibaba.dubbo.rpc.cluster;
18 |
19 | import java.util.List;
20 |
21 | import com.alibaba.dubbo.common.URL;
22 | import com.alibaba.dubbo.common.extension.SPI;
23 |
24 | /**
25 | * @author kimi
26 | */
27 | @SPI
28 | public interface RuleConverter {
29 |
30 | List convert(URL subscribeUrl, Object source);
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/dubbo-monitor/dubbo-monitor-api/src/main/java/com/alibaba/dubbo/monitor/Monitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.monitor;
17 |
18 | import com.alibaba.dubbo.common.Node;
19 |
20 | /**
21 | * Monitor. (SPI, Prototype, ThreadSafe)
22 | *
23 | * @see com.alibaba.dubbo.monitor.MonitorFactory#getMonitor(com.alibaba.dubbo.common.URL)
24 | * @author william.liangf
25 | */
26 | public interface Monitor extends Node, MonitorService {
27 |
28 | }
--------------------------------------------------------------------------------
/dubbo-common/src/main/java/com/alibaba/dubbo/common/status/StatusChecker.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.status;
17 |
18 | import com.alibaba.dubbo.common.extension.SPI;
19 |
20 | /**
21 | * StatusChecker
22 | *
23 | * @author william.liangf
24 | */
25 | @SPI
26 | public interface StatusChecker {
27 |
28 | /**
29 | * check status
30 | *
31 | * @return status
32 | */
33 | Status check();
34 |
35 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/compatible/CompatibleExt.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.extensionloader.compatible;
17 |
18 | import com.alibaba.dubbo.common.URL;
19 | import com.alibaba.dubbo.common.extension.Adaptive;
20 | import com.alibaba.dubbo.common.extension.SPI;
21 |
22 | /**
23 | * @author ding.lid
24 | */
25 | @SPI("impl1")
26 | public interface CompatibleExt {
27 | @Adaptive
28 | String echo(URL url, String s);
29 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/JavaSerializationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.serialize.serialization;
17 |
18 | import com.alibaba.dubbo.common.serialize.support.java.JavaSerialization;
19 |
20 | /**
21 | * @author ding.lid
22 | *
23 | */
24 | public class JavaSerializationTest extends AbstractSerializationPersionFailTest {
25 | {
26 | serialization = new JavaSerialization();
27 | }
28 | }
--------------------------------------------------------------------------------
/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/Assert.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.alibaba.dubbo.common.utils;
18 |
19 | /**
20 | * @author kimi
21 | */
22 | public abstract class Assert {
23 |
24 | protected Assert() {}
25 |
26 | public static void notNull(Object obj, String message) {
27 | if (obj == null) {
28 | throw new IllegalArgumentException(message);
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext6_wrap/impl/Ext5Impl1.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.extensionloader.ext6_wrap.impl;
17 |
18 | import com.alibaba.dubbo.common.URL;
19 | import com.alibaba.dubbo.common.extensionloader.ext6_wrap.WrappedExt;
20 |
21 | /**
22 | * @author ding.lid
23 | */
24 | public class Ext5Impl1 implements WrappedExt {
25 | public String echo(URL url, String s) {
26 | return "Ext5Impl1-echo";
27 | }
28 | }
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext5/impl/Ext5Impl1.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.extensionloader.ext5.impl;
17 |
18 | import com.alibaba.dubbo.common.URL;
19 | import com.alibaba.dubbo.common.extensionloader.ext5.NoAdaptiveMethodExt;
20 |
21 | /**
22 | * @author ding.lid
23 | */
24 | public class Ext5Impl1 implements NoAdaptiveMethodExt {
25 | public String echo(URL url, String s) {
26 | return "Ext5Impl1-echo";
27 | }
28 | }
--------------------------------------------------------------------------------
/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/impl/HelloServiceImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.alibaba.dubbo.config.spring.impl;
18 |
19 | import com.alibaba.dubbo.config.spring.api.HelloService;
20 |
21 | /**
22 | * @author kimi
23 | */
24 | public class HelloServiceImpl implements HelloService {
25 |
26 | public String sayHello(String name) {
27 | return "Hello, " + name;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/dubbo-admin/src/test/resources/AgreementData.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
10 |
12 |
--------------------------------------------------------------------------------
/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext4/impl/Ext4Impl1.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1999-2011 Alibaba Group.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.alibaba.dubbo.common.extensionloader.ext4.impl;
17 |
18 | import java.util.List;
19 |
20 | import com.alibaba.dubbo.common.extensionloader.ext4.NoUrlParamExt;
21 |
22 | /**
23 | * @author ding.lid
24 | */
25 | public class Ext4Impl1 implements NoUrlParamExt {
26 | public String bark(String name, List