Skip to content

Commit

Permalink
DUBBO-568 配置项dispather单词拼写错误。
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfei0201 committed Aug 15, 2012
1 parent 4838587 commit 0cdf517
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.alibaba.dubbo.common.threadpool.ThreadPool;
import com.alibaba.dubbo.config.support.Parameter;
import com.alibaba.dubbo.registry.support.AbstractRegistryFactory;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;
import com.alibaba.dubbo.remoting.Codec;
import com.alibaba.dubbo.remoting.Transporter;
import com.alibaba.dubbo.remoting.exchange.Exchanger;
Expand Down Expand Up @@ -95,7 +95,7 @@ public class ProtocolConfig extends AbstractConfig {
private String exchanger;

// 信息线程模型派发方式
private String dispather;
private String dispatcher;

// 对称网络组网方式
private String networker;
Expand Down Expand Up @@ -367,13 +367,31 @@ public void setExchanger(String exchanger) {
this.exchanger = exchanger;
}

/**
* 单词拼写错误,请使用getDispatcher()
* @deprecated {@link #getDispatcher()}
*/
@Deprecated
public String getDispather() {
return dispather;
return getDispatcher();
}

/**
* 单词拼写错误,请使用setDispatcher()
* @deprecated {@link #setDispatcher(String)}
*/
@Deprecated
public void setDispather(String dispather) {
checkExtension(Dispather.class, "dispather", exchanger);
this.dispather = dispather;
setDispatcher(dispather);
}

public String getDispatcher() {
return dispatcher;
}

public void setDispatcher(String dispatcher) {
checkExtension(Dispatcher.class, "dispacther", dispatcher);
this.dispatcher = dispatcher;
}

public String getNetworker() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.alibaba.dubbo.common.status.StatusChecker;
import com.alibaba.dubbo.common.threadpool.ThreadPool;
import com.alibaba.dubbo.config.support.Parameter;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;
import com.alibaba.dubbo.remoting.Transporter;
import com.alibaba.dubbo.remoting.exchange.Exchanger;
import com.alibaba.dubbo.remoting.telnet.TelnetHandler;
Expand Down Expand Up @@ -348,7 +348,7 @@ public String getDispather() {
}

public void setDispather(String dispather) {
checkExtension(Dispather.class, "dispather", exchanger);
checkExtension(Dispatcher.class, "dispather", exchanger);
this.dispather = dispather;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,12 @@
</xsd:attribute>
<xsd:attribute name="dispather" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[ The protocol dispather type. ]]></xsd:documentation>
<xsd:documentation><![CDATA[ Deprecated. replace to "dispatcher". ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="dispatcher" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[ The protocol dispatcher type. ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="networker" type="xsd:string" use="optional">
Expand Down Expand Up @@ -945,7 +950,12 @@
</xsd:attribute>
<xsd:attribute name="dispather" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[ The protocol dispather type. ]]></xsd:documentation>
<xsd:documentation><![CDATA[ Deprecated. replace to "dispatcher". ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="dispatcher" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[ The protocol dispatcher type. ]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="networker" type="xsd:string" use="optional">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @author chao.liuc
*/
@SPI(AllDispather.NAME)
public interface Dispather {
public interface Dispatcher {

/**
* dispath.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;
import com.alibaba.dubbo.remoting.exchange.support.header.HeartbeatHandler;
import com.alibaba.dubbo.remoting.transport.MultiMessageHandler;

Expand All @@ -36,7 +36,7 @@ public static ChannelHandler wrap(ChannelHandler handler, URL url){
protected ChannelHandlers() {}

protected ChannelHandler wrapInternal(ChannelHandler handler, URL url) {
return new MultiMessageHandler(new HeartbeatHandler(ExtensionLoader.getExtensionLoader(Dispather.class)
return new MultiMessageHandler(new HeartbeatHandler(ExtensionLoader.getExtensionLoader(Dispatcher.class)
.getAdaptiveExtension().dispath(handler, url)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;

/**
* 默认的线程池配置
*
* @author chao.liuc
*/
public class AllDispather implements Dispather {
public class AllDispather implements Dispatcher {

public static final String NAME = "all";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;

/**
* connect disconnect 保证顺序.
*
* @author chao.liuc
*/
public class ConnectionOrderedDispather implements Dispather {
public class ConnectionOrderedDispather implements Dispatcher {

public static final String NAME = "connection";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;

/**
* 不派发线程池。
*
* @author chao.liuc
*/
public class DirectDispather implements Dispather {
public class DirectDispather implements Dispatcher {

public static final String NAME = "direct";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;

/**
* 除发送全部使用线程池处理
*
* @author chao.liuc
*/
public class ExecutionDispather implements Dispather {
public class ExecutionDispather implements Dispatcher {

public static final String NAME = "execution";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;

/**
* 只有message receive使用线程池.
*
* @author chao.liuc
*/
public class MessageOnlyDispather implements Dispather {
public class MessageOnlyDispather implements Dispatcher {

public static final String NAME = "message";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Dispather;
import com.alibaba.dubbo.remoting.Dispatcher;

/**
* @author <a href="mailto:[email protected]">kimi</a>
Expand All @@ -32,7 +32,7 @@ public FakeChannelHandlers() {

@Override
protected ChannelHandler wrapInternal(ChannelHandler handler, URL url) {
return ExtensionLoader.getExtensionLoader(Dispather.class)
return ExtensionLoader.getExtensionLoader(Dispatcher.class)
.getAdaptiveExtension().dispath(handler, url);
}

Expand Down
2 changes: 1 addition & 1 deletion dubbo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Dispather</resource>
<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Dispatcher</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
Expand Down

0 comments on commit 0cdf517

Please sign in to comment.