Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed package from com.alibaba.dubbo to org.apache.dubbo for docs #204

Merged
merged 1 commit into from
Dec 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en-us/admin/install/provider-demo.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ install:
```sh
git clone https://github.com/apache/incubator-dubbo.git
cd incubator-dubbo
run com.alibaba.dubbo.demo.provider.Provider under dubbo-demo-provider module
run org.apache.dubbo.demo.provider.Provider under dubbo-demo-provider module
add -Djava.net.preferIPv4Stack=true if your IDE is Intellij Idea
```

4 changes: 2 additions & 2 deletions docs/en-us/admin/ops/pinpoint.md
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ pom.xml
```java
package com.example.demoprovider.provider;

import com.alibaba.dubbo.config.annotation.Service;
import org.apache.dubbo.config.annotation.Service;
import com.example.demoapi.HelloService;

@Service(version = "${demo.service.version}",
@@ -312,7 +312,7 @@ pom.xml
```java
package com.example.democonsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import org.apache.dubbo.config.annotation.Reference;
import com.example.demoapi.HelloService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
18 changes: 9 additions & 9 deletions docs/en-us/dev/SPI.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ In the jar file containing extension class [^1],places a config file `META-IN

### Example:

To extend Dubbo Protocol,placee a text file in the extension jar file:`META-INF/dubbo/com.alibaba.dubbo.rpc.Protocol`,content:
To extend Dubbo Protocol,placee a text file in the extension jar file:`META-INF/dubbo/org.apache.dubbo.rpc.Protocol`,content:

```properties
xxx=com.alibaba.xxx.XxxProtocol
@@ -29,7 +29,7 @@ content of the implementation [^2]:
```java
package com.alibaba.xxx;

import com.alibaba.dubbo.rpc.Protocol;
import org.apache.dubbo.rpc.Protocol;

public class XxxProtocol implements Protocol {
// ...
@@ -55,7 +55,7 @@ Wrapper class content:
```java
package com.alibaba.xxx;

import com.alibaba.dubbo.rpc.Protocol;
import org.apache.dubbo.rpc.Protocol;

public class XxxProtocolWrapper implements Protocol {
Protocol impl;
@@ -197,8 +197,8 @@ for the method bind(),Adaptive will firstly search `server` key,if no Key wer
As for Collections SPI, such as:`Filter`, `InvokerListener`, `ExportListener`, `TelnetHandler`, `StatusChecker` etc,multi implementations can be loaded at one time. User can simplify configuration by using auto activation,Like:

```java
import com.alibaba.dubbo.common.extension.Activate;
import com.alibaba.dubbo.rpc.Filter;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.rpc.Filter;

@Activate // Active for any condition
public class XxxFilter implements Filter {
@@ -209,8 +209,8 @@ public class XxxFilter implements Filter {
Or:

```java
import com.alibaba.dubbo.common.extension.Activate;
import com.alibaba.dubbo.rpc.Filter;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.rpc.Filter;

@Activate("xxx") // when configed xxx parameter and the parameter has a valid value,the SPI is activated,for example configed cache="lru",auto acitivate CacheFilter。
public class XxxFilter implements Filter {
@@ -221,8 +221,8 @@ public class XxxFilter implements Filter {
Or:

```java
import com.alibaba.dubbo.common.extension.Activate;
import com.alibaba.dubbo.rpc.Filter;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.rpc.Filter;

@Activate(group = "provider", value = "xxx") // only activate for provider,group can be "provider" or "consumer"
public class XxxFilter implements Filter {
10 changes: 5 additions & 5 deletions docs/en-us/dev/code-smell.md
Original file line number Diff line number Diff line change
@@ -23,14 +23,14 @@ REFER(dubbo://provider-address/com.xxx.XxxService?version=1.0.0)
export service to registry:

```
EXPORT(registry://registry-address/com.alibaba.dubbo.registry.RegistrySerevice?registry=dubbo&export=ENCODE(dubbo://provider-address/com.xxx.XxxService?version=1.0.0))
EXPORT(registry://registry-address/org.apache.dubbo.registry.RegistrySerevice?registry=dubbo&export=ENCODE(dubbo://provider-address/com.xxx.XxxService?version=1.0.0))
```

accquire registry:

```
url.setProtocol(url.getParameter("registry", "dubbo"))
GETREGISTRY(dubbo://registry-address/com.alibaba.dubbo.registry.RegistrySerevice)
GETREGISTRY(dubbo://registry-address/org.apache.dubbo.registry.RegistrySerevice)
```

registry service address:
@@ -45,14 +45,14 @@ REGISTER(dubbo://provider-address/com.xxx.XxxService?version=1.0.0)
refer service from registry:

```
REFER(registry://registry-address/com.alibaba.dubbo.registry.RegistrySerevice?registry=dubbo&refer=ENCODE(version=1.0.0))
REFER(registry://registry-address/org.apache.dubbo.registry.RegistrySerevice?registry=dubbo&refer=ENCODE(version=1.0.0))
```

accquire registry:

```
url.setProtocol(url.getParameter("registry", "dubbo"))
GETREGISTRY(dubbo://registry-address/com.alibaba.dubbo.registry.RegistrySerevice)
GETREGISTRY(dubbo://registry-address/org.apache.dubbo.registry.RegistrySerevice)
```

subscribe service address:
@@ -155,7 +155,7 @@ public class <SPI interface name>$Adpative implements <SPI interface> {

`@Adaptive` annotation usage:

If no value is configed for those Keys in URL,default SPI implementation is used。For example ,String[] {"key1", "key2"},firstly Dubbo will look up value for key1 and use it as SPI name;if key1 value is not founded then look up for key2,if value of key2 is also not found ,then use default spi implementation. If no default implementation is configed, then the method will throw IllegalStateException。if not configed , then default implement is lower case of the interface class full package name. For Extension interface `com.alibaba.dubbo.xxx.YyyInvokerWrapper` , default value is `new String[] {"yyy.invoker.wrapper"}`
If no value is configed for those Keys in URL,default SPI implementation is used。For example ,String[] {"key1", "key2"},firstly Dubbo will look up value for key1 and use it as SPI name;if key1 value is not founded then look up for key2,if value of key2 is also not found ,then use default spi implementation. If no default implementation is configed, then the method will throw IllegalStateException。if not configed , then default implement is lower case of the interface class full package name. For Extension interface `org.apache.dubbo.xxx.YyyInvokerWrapper` , default value is `new String[] {"yyy.invoker.wrapper"}`

## Callback Function

4 changes: 2 additions & 2 deletions docs/en-us/dev/implementation.md
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ Based on extension point adaptive mechanism, call `export()` method of `DubboPro

#### 2. Expose to Registry:

Expose provider address to Registry [^2], the URL format which parsing by `ServiceConfig`: `registry://registry-host/com.alibaba.dubbo.registry.RegistryService?export=URL.encode("dubbo://service-host/com.foo.FooService?version=1.0.0")`,
Expose provider address to Registry [^2], the URL format which parsing by `ServiceConfig`: `registry://registry-host/org.apache.dubbo.registry.RegistryService?export=URL.encode("dubbo://service-host/com.foo.FooService?version=1.0.0")`,

Based on extension point adaptive mechanism, call `export()` method of `RegistryProtocol` by identifying `registry://` protocol header, register the provider URL parameter of `export` to Registry.

@@ -40,7 +40,7 @@ Based on extension point adaptive mechanism, call `refer()` method of `DubboProt
#### 2. Service Registry discovery

Discover provider address by Registry [^4], the URL format which parsing by `ReferenceConfig`:
`registry://registry-host/com.alibaba.dubbo.registry.RegistryService?refer=URL.encode("consumer://consumer-host/com.foo.FooService?version=1.0.0")`.
`registry://registry-host/org.apache.dubbo.registry.RegistryService?refer=URL.encode("consumer://consumer-host/com.foo.FooService?version=1.0.0")`.

Based on extension point adaptive mechanism, call `refer()` method of `RegistryProtocol` by identifying `registry://` protocol header of URL, then based on the condition of parameter of `refer` to search provider URL, for example: `dubbo://service-host/com.foo.FooService?version=1.0.0`.

16 changes: 8 additions & 8 deletions docs/en-us/dev/impls/cache.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ Cache the return value, use request parameter as the key.

## Extension Interface

`com.alibaba.dubbo.cache.CacheFactory`
`org.apache.dubbo.cache.CacheFactory`

## Extension Configuration

@@ -21,9 +21,9 @@ Cache the return value, use request parameter as the key.

## Existing Extensions

* `com.alibaba.dubbo.cache.support.lru.LruCacheFactory`
* `com.alibaba.dubbo.cache.support.threadlocal.ThreadLocalCacheFactory`
* `com.alibaba.dubbo.cache.support.jcache.JCacheFactory`
* `org.apache.dubbo.cache.support.lru.LruCacheFactory`
* `org.apache.dubbo.cache.support.threadlocal.ThreadLocalCacheFactory`
* `org.apache.dubbo.cache.support.jcache.JCacheFactory`


## Extension Guide
@@ -40,15 +40,15 @@ src
|-resources
|-META-INF
|-dubbo
|-com.alibaba.dubbo.cache.CacheFactory (plain text file with contents: xxx=com.xxx.XxxCacheFactory)
|-org.apache.dubbo.cache.CacheFactory (plain text file with contents: xxx=com.xxx.XxxCacheFactory)
```

XxxCacheFactory.java:

```java
package com.xxx;

import com.alibaba.dubbo.cache.CacheFactory;
import org.apache.dubbo.cache.CacheFactory;

public class XxxCacheFactory implements CacheFactory {
public Cache getCache(URL url, String name) {
@@ -62,7 +62,7 @@ XxxCacheFactory.java:
```java
package com.xxx;

import com.alibaba.dubbo.cache.Cache;
import org.apache.dubbo.cache.Cache;

public class XxxCache implements Cache {
public Cache(URL url, String name) {
@@ -77,7 +77,7 @@ public class XxxCache implements Cache {
}
```

META-INF/dubbo/com.alibaba.dubbo.cache.CacheFactory:
META-INF/dubbo/org.apache.dubbo.cache.CacheFactory:

```properties
xxx=com.xxx.XxxCacheFactory
34 changes: 17 additions & 17 deletions docs/en-us/dev/impls/cluster.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ Group service providers in a cluster, and treat them as one single provider.

## Extension Interface

`com.alibaba.dubbo.rpc.cluster.Cluster`
`org.apache.dubbo.rpc.cluster.Cluster`

## Extension Configuration

@@ -18,12 +18,12 @@ Group service providers in a cluster, and treat them as one single provider.

## Existing Extensions

* `com.alibaba.dubbo.rpc.cluster.support.FailoverCluster`
* `com.alibaba.dubbo.rpc.cluster.support.FailfastCluster`
* `com.alibaba.dubbo.rpc.cluster.support.FailsafeCluster`
* `com.alibaba.dubbo.rpc.cluster.support.FailbackCluster`
* `com.alibaba.dubbo.rpc.cluster.support.ForkingCluster`
* `com.alibaba.dubbo.rpc.cluster.support.AvailableCluster`
* `org.apache.dubbo.rpc.cluster.support.FailoverCluster`
* `org.apache.dubbo.rpc.cluster.support.FailfastCluster`
* `org.apache.dubbo.rpc.cluster.support.FailsafeCluster`
* `org.apache.dubbo.rpc.cluster.support.FailbackCluster`
* `org.apache.dubbo.rpc.cluster.support.ForkingCluster`
* `org.apache.dubbo.rpc.cluster.support.AvailableCluster`

## Extension Guide

@@ -39,22 +39,22 @@ src
|-resources
|-META-INF
|-dubbo
|-com.alibaba.dubbo.rpc.cluster.Cluster (plain text file with the content: xxx=com.xxx.XxxCluster)
|-org.apache.dubbo.rpc.cluster.Cluster (plain text file with the content: xxx=com.xxx.XxxCluster)
```

XxxCluster.java:

```java
package com.xxx;

import com.alibaba.dubbo.rpc.cluster.Cluster;
import com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker;
import com.alibaba.dubbo.rpc.cluster.Directory;
import com.alibaba.dubbo.rpc.cluster.LoadBalance;
import com.alibaba.dubbo.rpc.Invoker;
import com.alibaba.dubbo.rpc.Invocation;
import com.alibaba.dubbo.rpc.Result;
import com.alibaba.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.cluster.Cluster;
import org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker;
import org.apache.dubbo.rpc.cluster.Directory;
import org.apache.dubbo.rpc.cluster.LoadBalance;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.Result;
import org.apache.dubbo.rpc.RpcException;

public class XxxCluster implements Cluster {
public <T> Invoker<T> merge(Directory<T> directory) throws RpcException {
@@ -67,7 +67,7 @@ public class XxxCluster implements Cluster {
}
```

META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.Cluster:
META-INF/dubbo/org.apache.dubbo.rpc.cluster.Cluster:

```properties
xxx=com.xxx.XxxCluster
12 changes: 6 additions & 6 deletions docs/en-us/dev/impls/compiler.md
Original file line number Diff line number Diff line change
@@ -6,16 +6,16 @@ Java compiler, used for byte code dynamic generation for RPC invocation.

## Extension Interface

`com.alibaba.dubbo.common.compiler.Compiler`
`org.apache.dubbo.common.compiler.Compiler`

## Extension Configuration

No configuration required, the extension will be automatically discovered and loaded.

## Existing Extensions

* `com.alibaba.dubbo.common.compiler.support.JdkCompiler`
* `com.alibaba.dubbo.common.compiler.support.JavassistCompiler`
* `org.apache.dubbo.common.compiler.support.JdkCompiler`
* `org.apache.dubbo.common.compiler.support.JavassistCompiler`

## Extension Guide

@@ -31,15 +31,15 @@ src
|-resources
|-META-INF
|-dubbo
|-com.alibaba.dubbo.common.compiler.Compiler (plain text file with the content: xxx=com.xxx.XxxCompiler)
|-org.apache.dubbo.common.compiler.Compiler (plain text file with the content: xxx=com.xxx.XxxCompiler)
```

XxxCompiler.java:

```java
package com.xxx;

import com.alibaba.dubbo.common.compiler.Compiler;
import org.apache.dubbo.common.compiler.Compiler;

public class XxxCompiler implements Compiler {
public Object getExtension(Class<?> type, String name) {
@@ -48,7 +48,7 @@ public class XxxCompiler implements Compiler {
}
```

META-INF/dubbo/com.alibaba.dubbo.common.compiler.Compiler:
META-INF/dubbo/org.apache.dubbo.common.compiler.Compiler:

```properties
xxx=com.xxx.XxxCompiler
16 changes: 8 additions & 8 deletions docs/en-us/dev/impls/container.md
Original file line number Diff line number Diff line change
@@ -6,19 +6,19 @@ Service container extension, useful for loading custom contents.

## Extension Interface

`com.alibaba.dubbo.container.Container`
`org.apache.dubbo.container.Container`

## Extension Configuration

```sh
java com.alibaba.dubbo.container.Main spring jetty log4j
java org.apache.dubbo.container.Main spring jetty log4j
```

## Existing Extensions

* `com.alibaba.dubbo.container.spring.SpringContainer`
* `com.alibaba.dubbo.container.spring.JettyContainer`
* `com.alibaba.dubbo.container.spring.Log4jContainer`
* `org.apache.dubbo.container.spring.SpringContainer`
* `org.apache.dubbo.container.spring.JettyContainer`
* `org.apache.dubbo.container.spring.Log4jContainer`

## Extension Guide

@@ -34,15 +34,15 @@ src
|-resources
|-META-INF
|-dubbo
|-com.alibaba.dubbo.container.Container (plain text file with the content: xxx=com.xxx.XxxContainer)
|-org.apache.dubbo.container.Container (plain text file with the content: xxx=com.xxx.XxxContainer)
```

XxxContainer.java:

```java
package com.xxx;

com.alibaba.dubbo.container.Container;
org.apache.dubbo.container.Container;


public class XxxContainer implements Container {
@@ -55,7 +55,7 @@ public class XxxContainer implements Container {
}
```

META-INF/dubbo/com.alibaba.dubbo.container.Container:
META-INF/dubbo/org.apache.dubbo.container.Container:

```properties
xxx=com.xxx.XxxContainer
Loading