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 788f373 commit 220aa6d
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 46 deletions.
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.Adaptive;
import com.alibaba.dubbo.common.extension.SPI;
import com.alibaba.dubbo.remoting.transport.dispather.all.AllDispather;
import com.alibaba.dubbo.remoting.transport.dispatcher.all.AllDispather;

/**
* ChannelHandlerWrapper (SPI, Singleton, ThreadSafe)
Expand All @@ -30,13 +30,13 @@
public interface Dispatcher {

/**
* dispath.
* dispatch the message to threadpool.
*
* @param handler
* @param url
* @return channel handler
*/
@Adaptive({Constants.DISPATCHER_KEY, "dispather", "channel.handler"}) // 后两个参数为兼容旧配置
ChannelHandler dispath(ChannelHandler handler, URL url);
ChannelHandler dispatch(ChannelHandler handler, URL url);

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Client;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelHandlers;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelHandlers;

/**
* AbstractClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.Server;
import com.alibaba.dubbo.remoting.transport.dispather.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.WrappedChannelHandler;

/**
* AbstractServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather;
package com.alibaba.dubbo.remoting.transport.dispatcher;

import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather;
package com.alibaba.dubbo.remoting.transport.dispatcher;


import com.alibaba.dubbo.common.URL;
Expand All @@ -37,7 +37,7 @@ protected ChannelHandlers() {}

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

private static ChannelHandlers INSTANCE = new ChannelHandlers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather;
package com.alibaba.dubbo.remoting.transport.dispatcher;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.all;
package com.alibaba.dubbo.remoting.transport.dispatcher.all;

import java.util.concurrent.ExecutorService;

Expand All @@ -22,9 +22,9 @@
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.ExecutionException;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable.ChannelState;
import com.alibaba.dubbo.remoting.transport.dispather.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable;
import com.alibaba.dubbo.remoting.transport.dispatcher.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.ChannelState;

public class AllChannelHandler extends WrappedChannelHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.all;
package com.alibaba.dubbo.remoting.transport.dispatcher.all;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
Expand All @@ -28,7 +28,7 @@ public class AllDispather implements Dispatcher {

public static final String NAME = "all";

public ChannelHandler dispath(ChannelHandler handler, URL url) {
public ChannelHandler dispatch(ChannelHandler handler, URL url) {
return new AllChannelHandler(handler, url);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.connection;
package com.alibaba.dubbo.remoting.transport.dispatcher.connection;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
Expand All @@ -28,9 +28,9 @@
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.ExecutionException;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable.ChannelState;
import com.alibaba.dubbo.remoting.transport.dispather.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable;
import com.alibaba.dubbo.remoting.transport.dispatcher.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.ChannelState;

public class ConnectionOrderedChannelHandler extends WrappedChannelHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.connection;
package com.alibaba.dubbo.remoting.transport.dispatcher.connection;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
Expand All @@ -28,7 +28,7 @@ public class ConnectionOrderedDispather implements Dispatcher {

public static final String NAME = "connection";

public ChannelHandler dispath(ChannelHandler handler, URL url) {
public ChannelHandler dispatch(ChannelHandler handler, URL url) {
return new ConnectionOrderedChannelHandler(handler, url);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.direct;
package com.alibaba.dubbo.remoting.transport.dispatcher.direct;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
Expand All @@ -28,7 +28,7 @@ public class DirectDispather implements Dispatcher {

public static final String NAME = "direct";

public ChannelHandler dispath(ChannelHandler handler, URL url) {
public ChannelHandler dispatch(ChannelHandler handler, URL url) {
return handler;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.execution;
package com.alibaba.dubbo.remoting.transport.dispatcher.execution;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.Channel;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable.ChannelState;
import com.alibaba.dubbo.remoting.transport.dispather.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable;
import com.alibaba.dubbo.remoting.transport.dispatcher.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.ChannelState;

public class ExecutionChannelHandler extends WrappedChannelHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.execution;
package com.alibaba.dubbo.remoting.transport.dispatcher.execution;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
Expand All @@ -28,7 +28,7 @@ public class ExecutionDispather implements Dispatcher {

public static final String NAME = "execution";

public ChannelHandler dispath(ChannelHandler handler, URL url) {
public ChannelHandler dispatch(ChannelHandler handler, URL url) {
return new ExecutionChannelHandler(handler, url);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.message;
package com.alibaba.dubbo.remoting.transport.dispatcher.message;

import java.util.concurrent.ExecutorService;

Expand All @@ -22,9 +22,9 @@
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.ExecutionException;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable.ChannelState;
import com.alibaba.dubbo.remoting.transport.dispather.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable;
import com.alibaba.dubbo.remoting.transport.dispatcher.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.ChannelState;

public class MessageOnlyChannelHandler extends WrappedChannelHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.dubbo.remoting.transport.dispather.message;
package com.alibaba.dubbo.remoting.transport.dispatcher.message;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.ChannelHandler;
Expand All @@ -28,7 +28,7 @@ public class MessageOnlyDispather implements Dispatcher {

public static final String NAME = "message";

public ChannelHandler dispath(ChannelHandler handler, URL url) {
public ChannelHandler dispatch(ChannelHandler handler, URL url) {
return new MessageOnlyChannelHandler(handler, url);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all=com.alibaba.dubbo.remoting.transport.dispather.all.AllDispather
direct=com.alibaba.dubbo.remoting.transport.dispather.direct.DirectDispather
message=com.alibaba.dubbo.remoting.transport.dispather.message.MessageOnlyDispather
execution=com.alibaba.dubbo.remoting.transport.dispather.execution.ExecutionDispather
connection=com.alibaba.dubbo.remoting.transport.dispather.connection.ConnectionOrderedDispather
all=com.alibaba.dubbo.remoting.transport.dispatcher.all.AllDispather
direct=com.alibaba.dubbo.remoting.transport.dispatcher.direct.DirectDispather
message=com.alibaba.dubbo.remoting.transport.dispatcher.message.MessageOnlyDispather
execution=com.alibaba.dubbo.remoting.transport.dispatcher.execution.ExecutionDispather
connection=com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedDispather
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import com.alibaba.dubbo.remoting.exchange.ExchangeServer;
import com.alibaba.dubbo.remoting.exchange.Exchangers;
import com.alibaba.dubbo.remoting.exchange.support.ExchangeHandlerAdapter;
import com.alibaba.dubbo.remoting.transport.dispather.execution.ExecutionDispather;
import com.alibaba.dubbo.remoting.transport.dispatcher.execution.ExecutionDispather;

/**
* PerformanceServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.exchange.Request;
import com.alibaba.dubbo.remoting.exchange.Response;
import com.alibaba.dubbo.remoting.transport.dispather.connection.ConnectionOrderedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedChannelHandler;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.Channel;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.transport.dispather.WrappedChannelHandler;
import com.alibaba.dubbo.remoting.transport.dispatcher.WrappedChannelHandler;

public class WrappedChannelHandlerTest {
WrappedChannelHandler handler ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.transport.AbstractServer;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelHandlers;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelHandlers;

/**
* MinaServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import com.alibaba.dubbo.remoting.RemotingException;
import com.alibaba.dubbo.remoting.Server;
import com.alibaba.dubbo.remoting.transport.AbstractServer;
import com.alibaba.dubbo.remoting.transport.dispather.ChannelHandlers;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelHandlers;

/**
* NettyServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.alibaba.dubbo.remoting.ChannelHandler;
import com.alibaba.dubbo.remoting.Dispatcher;
import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelHandlers;

/**
* @author <a href="mailto:gang.lvg@alibaba-inc.com">kimi</a>
Expand All @@ -33,7 +34,7 @@ public FakeChannelHandlers() {
@Override
protected ChannelHandler wrapInternal(ChannelHandler handler, URL url) {
return ExtensionLoader.getExtensionLoader(Dispatcher.class)
.getAdaptiveExtension().dispath(handler, url);
.getAdaptiveExtension().dispatch(handler, url);
}

public static void setTestingChannelHandlers() {
Expand Down

0 comments on commit 220aa6d

Please sign in to comment.