From 8e20d1ca06597e75903cb97c6a01c470686fcf08 Mon Sep 17 00:00:00 2001 From: WangXin Date: Tue, 19 Dec 2017 21:43:18 -0600 Subject: [PATCH] #1055 Translate the comments of dubbo-remoting module (#1065) --- dubbo-registry/dubbo-registry-default/pom.xml | 1 + dubbo-remoting/dubbo-remoting-api/pom.xml | 17 ++-- .../com/alibaba/dubbo/remoting/Channel.java | 21 ++-- .../dubbo/remoting/ChannelHandler.java | 19 ++-- .../com/alibaba/dubbo/remoting/Client.java | 18 ++-- .../com/alibaba/dubbo/remoting/Codec.java | 21 ++-- .../com/alibaba/dubbo/remoting/Codec2.java | 15 +-- .../alibaba/dubbo/remoting/Decodeable.java | 25 ++--- .../alibaba/dubbo/remoting/Dispatcher.java | 19 ++-- .../com/alibaba/dubbo/remoting/Endpoint.java | 19 ++-- .../dubbo/remoting/ExecutionException.java | 18 ++-- .../dubbo/remoting/RemotingException.java | 18 ++-- .../com/alibaba/dubbo/remoting/Server.java | 18 ++-- .../dubbo/remoting/TimeoutException.java | 18 ++-- .../alibaba/dubbo/remoting/Transporter.java | 19 ++-- .../alibaba/dubbo/remoting/Transporters.java | 19 ++-- .../buffer/AbstractChannelBuffer.java | 15 +-- .../buffer/ByteBufferBackedChannelBuffer.java | 15 +-- .../dubbo/remoting/buffer/ChannelBuffer.java | 15 +-- .../remoting/buffer/ChannelBufferFactory.java | 16 +-- .../buffer/ChannelBufferInputStream.java | 15 +-- .../buffer/ChannelBufferOutputStream.java | 15 +-- .../dubbo/remoting/buffer/ChannelBuffers.java | 15 +-- .../buffer/DirectChannelBufferFactory.java | 15 +-- .../remoting/buffer/DynamicChannelBuffer.java | 15 +-- .../remoting/buffer/HeapChannelBuffer.java | 15 +-- .../buffer/HeapChannelBufferFactory.java | 15 +-- .../remoting/exchange/ExchangeChannel.java | 19 ++-- .../remoting/exchange/ExchangeClient.java | 19 ++-- .../remoting/exchange/ExchangeHandler.java | 19 ++-- .../remoting/exchange/ExchangeServer.java | 19 ++-- .../dubbo/remoting/exchange/Exchanger.java | 19 ++-- .../dubbo/remoting/exchange/Exchangers.java | 19 ++-- .../dubbo/remoting/exchange/Request.java | 22 ++--- .../dubbo/remoting/exchange/Response.java | 26 +++-- .../remoting/exchange/ResponseCallback.java | 19 ++-- .../remoting/exchange/ResponseFuture.java | 19 ++-- .../exchange/codec/ExchangeCodec.java | 21 ++-- .../exchange/support/DefaultFuture.java | 20 ++-- .../support/ExchangeHandlerAdapter.java | 19 ++-- .../support/ExchangeHandlerDispatcher.java | 19 ++-- .../support/ExchangeServerDelegate.java | 19 ++-- .../exchange/support/MultiMessage.java | 14 +-- .../remoting/exchange/support/Replier.java | 19 ++-- .../exchange/support/ReplierDispatcher.java | 19 ++-- .../exchange/support/SimpleFuture.java | 19 ++-- .../support/header/HeaderExchangeChannel.java | 19 ++-- .../support/header/HeaderExchangeClient.java | 34 +++---- .../support/header/HeaderExchangeHandler.java | 20 ++-- .../support/header/HeaderExchangeServer.java | 23 +++-- .../support/header/HeaderExchanger.java | 19 ++-- .../support/header/HeartBeatTask.java | 29 +++--- .../support/header/HeartbeatHandler.java | 25 ++--- .../dubbo/remoting/telnet/TelnetHandler.java | 19 ++-- .../remoting/telnet/codec/TelnetCodec.java | 21 ++-- .../dubbo/remoting/telnet/support/Help.java | 19 ++-- .../telnet/support/TelnetHandlerAdapter.java | 19 ++-- .../remoting/telnet/support/TelnetUtils.java | 19 ++-- .../support/command/ClearTelnetHandler.java | 19 ++-- .../support/command/ExitTelnetHandler.java | 19 ++-- .../support/command/HelpTelnetHandler.java | 19 ++-- .../support/command/LogTelnetHandler.java | 19 ++-- .../support/command/StatusTelnetHandler.java | 19 ++-- .../remoting/transport/AbstractChannel.java | 19 ++-- .../AbstractChannelHandlerDelegate.java | 18 +++- .../remoting/transport/AbstractClient.java | 22 ++--- .../remoting/transport/AbstractCodec.java | 19 ++-- .../remoting/transport/AbstractEndpoint.java | 19 ++-- .../remoting/transport/AbstractPeer.java | 22 ++--- .../remoting/transport/AbstractServer.java | 20 ++-- .../remoting/transport/ChannelDelegate.java | 19 ++-- .../transport/ChannelHandlerAdapter.java | 19 ++-- .../transport/ChannelHandlerDelegate.java | 35 +++---- .../transport/ChannelHandlerDispatcher.java | 19 ++-- .../remoting/transport/ClientDelegate.java | 19 ++-- .../remoting/transport/CodecSupport.java | 25 ++--- .../remoting/transport/DecodeHandler.java | 25 ++--- .../ExceedPayloadLimitException.java | 16 +++ .../transport/MultiMessageHandler.java | 18 +++- .../remoting/transport/ServerDelegate.java | 19 ++-- .../transport/codec/CodecAdapter.java | 15 +-- .../transport/codec/TransportCodec.java | 19 ++-- .../dispatcher/ChannelEventRunnable.java | 21 ++-- .../transport/dispatcher/ChannelHandlers.java | 19 ++-- .../dispatcher/WrappedChannelHandler.java | 17 ++-- .../dispatcher/all/AllChannelHandler.java | 21 ++-- .../dispatcher/all/AllDispatcher.java | 21 ++-- .../ConnectionOrderedChannelHandler.java | 48 +++++---- .../ConnectionOrderedDispatcher.java | 21 ++-- .../dispatcher/direct/DirectDispatcher.java | 21 ++-- .../execution/ExecutionChannelHandler.java | 21 ++-- .../execution/ExecutionDispatcher.java | 21 ++-- .../message/MessageOnlyChannelHandler.java | 17 ++-- .../message/MessageOnlyDispatcher.java | 21 ++-- .../dubbo/remoting/ChanelHandlerTest.java | 19 ++-- .../alibaba/dubbo/remoting/DemoService.java | 17 ++-- .../dubbo/remoting/DemoServiceImpl.java | 17 ++-- .../java/com/alibaba/dubbo/remoting/Main.java | 17 ++-- .../alibaba/dubbo/remoting/MockResult.java | 19 ++-- .../remoting/PerformanceClientCloseTest.java | 21 ++-- .../remoting/PerformanceClientFixedTest.java | 19 ++-- .../dubbo/remoting/PerformanceClientMain.java | 41 ++++---- .../dubbo/remoting/PerformanceClientTest.java | 2 - .../dubbo/remoting/PerformanceServerMain.java | 19 ++-- .../dubbo/remoting/PerformanceServerTest.java | 19 ++-- .../dubbo/remoting/PerformanceUtils.java | 19 ++-- .../alibaba/dubbo/remoting/RpcMessage.java | 19 ++-- .../dubbo/remoting/RpcMessageHandler.java | 19 ++-- .../alibaba/dubbo/remoting/TelnetServer.java | 21 ++-- .../buffer/AbstractChannelBufferTest.java | 18 +++- .../ByteBufferBackedChannelBufferTest.java | 18 +++- .../buffer/ChannelBufferStreamTest.java | 18 +++- .../buffer/DirectChannelBufferTest.java | 18 +++- .../buffer/DynamicChannelBufferTest.java | 18 +++- .../buffer/HeapChannelBufferTest.java | 18 +++- .../remoting/codec/AbstractMockChannel.java | 19 ++-- .../remoting/codec/ExchangeCodecTest.java | 19 ++-- .../dubbo/remoting/codec/TelnetCodecTest.java | 19 ++-- .../support/header/HeartBeatTaskTest.java | 25 ++--- .../exchange/support/header/MockChannel.java | 29 +++--- .../handler/ConnectChannelHandlerTest.java | 17 ++-- .../handler/HeaderExchangeHandlerTest.java | 17 ++-- .../dubbo/remoting/handler/MockedChannel.java | 19 ++-- .../handler/MockedChannelHandler.java | 19 ++-- .../handler/WrappedChannelHandlerTest.java | 17 ++-- .../remoting/transport/AbstractCodecTest.java | 15 +-- .../transport/codec/CodecAdapterTest.java | 18 +++- .../codec/DeprecatedExchangeCodec.java | 18 +++- .../codec/DeprecatedTelnetCodec.java | 18 +++- .../src/test/resources/log4j.xml | 17 ++-- dubbo-remoting/dubbo-remoting-grizzly/pom.xml | 17 ++-- .../transport/grizzly/GrizzlyChannel.java | 19 ++-- .../transport/grizzly/GrizzlyClient.java | 2 +- .../grizzly/GrizzlyCodecAdapter.java | 19 ++-- .../transport/grizzly/GrizzlyHandler.java | 19 ++-- .../transport/grizzly/GrizzlyServer.java | 19 ++-- .../transport/grizzly/GrizzlyTransporter.java | 19 ++-- dubbo-remoting/dubbo-remoting-http/pom.xml | 17 ++-- .../dubbo/remoting/http/HttpBinder.java | 19 ++-- .../dubbo/remoting/http/HttpHandler.java | 19 ++-- .../dubbo/remoting/http/HttpServer.java | 17 ++-- .../remoting/http/jetty/JettyHttpBinder.java | 19 ++-- .../remoting/http/jetty/JettyHttpServer.java | 17 ++-- .../http/servlet/DispatcherServlet.java | 19 ++-- .../http/servlet/ServletHttpBinder.java | 19 ++-- .../http/servlet/ServletHttpServer.java | 17 ++-- .../http/support/AbstractHttpServer.java | 19 ++-- dubbo-remoting/dubbo-remoting-mina/pom.xml | 17 ++-- .../remoting/transport/mina/MinaChannel.java | 20 ++-- .../remoting/transport/mina/MinaClient.java | 20 ++-- .../transport/mina/MinaCodecAdapter.java | 19 ++-- .../remoting/transport/mina/MinaHandler.java | 19 ++-- .../remoting/transport/mina/MinaServer.java | 21 ++-- .../transport/mina/MinaTransporter.java | 19 ++-- .../transport/mina/ClientToServerTest.java | 19 ++-- .../remoting/transport/mina/ClientsTest.java | 19 ++-- .../remoting/transport/mina/Hello.java | 19 ++-- .../mina/MinaClientToServerTest.java | 19 ++-- .../remoting/transport/mina/World.java | 19 ++-- .../remoting/transport/mina/WorldHandler.java | 19 ++-- .../netty/NettyBackedChannelBuffer.java | 18 +++- .../NettyBackedChannelBufferFactory.java | 18 +++- .../transport/netty/NettyChannel.java | 20 ++-- .../remoting/transport/netty/NettyClient.java | 22 ++--- .../transport/netty/NettyCodecAdapter.java | 2 - .../transport/netty/NettyHandler.java | 19 ++-- .../remoting/transport/netty/NettyHelper.java | 15 +-- .../remoting/transport/netty/NettyServer.java | 20 ++-- .../transport/netty/NettyTransporter.java | 19 ++-- .../support/header/HeartbeatHandlerTest.java | 25 ++--- .../dispatcher/FakeChannelHandlers.java | 25 ++--- .../transport/netty/ClientReconnectTest.java | 98 +++---------------- .../transport/netty/ClientToServerTest.java | 19 ++-- .../remoting/transport/netty/ClientsTest.java | 19 ++-- .../dubbo/remoting/transport/netty/Hello.java | 19 ++-- .../transport/netty/NettyClientTest.java | 18 ++-- .../netty/NettyClientToServerTest.java | 19 ++-- .../transport/netty/NettyStringTest.java | 18 ++-- .../transport/netty/TelnetClientHandler.java | 32 +++--- .../transport/netty/TelnetServerHandler.java | 18 ++-- .../transport/netty/ThreadNameTest.java | 15 +-- .../dubbo/remoting/transport/netty/World.java | 19 ++-- .../transport/netty/WorldHandler.java | 19 ++-- .../src/test/resources/log4j.xml | 17 ++-- dubbo-remoting/dubbo-remoting-netty4/pom.xml | 16 +++ .../netty4/NettyBackedChannelBuffer.java | 18 +++- .../transport/netty4/NettyChannel.java | 22 ++--- .../transport/netty4/NettyClient.java | 22 ++--- .../transport/netty4/NettyClientHandler.java | 21 ++-- .../transport/netty4/NettyCodecAdapter.java | 31 +++--- .../transport/netty4/NettyServer.java | 22 ++--- .../transport/netty4/NettyServerHandler.java | 23 +++-- .../transport/netty4/NettyTransporter.java | 23 ++--- .../netty4/logging/FormattingTuple.java | 45 +++------ .../netty4/logging/MessageFormatter.java | 16 +++ .../transport/netty4/logging/NettyHelper.java | 16 +-- .../src/test/java/com/alibaba/AppTest.java | 16 +++ dubbo-remoting/dubbo-remoting-p2p/pom.xml | 17 ++-- .../com/alibaba/dubbo/remoting/p2p/Group.java | 19 ++-- .../alibaba/dubbo/remoting/p2p/Networker.java | 19 ++-- .../dubbo/remoting/p2p/Networkers.java | 19 ++-- .../com/alibaba/dubbo/remoting/p2p/Peer.java | 19 ++-- .../remoting/p2p/exchange/ExchangeGroup.java | 19 ++-- .../p2p/exchange/ExchangeNetworker.java | 19 ++-- .../p2p/exchange/ExchangeNetworkers.java | 19 ++-- .../remoting/p2p/exchange/ExchangePeer.java | 19 ++-- .../support/AbstractExchangeGroup.java | 25 +++-- .../exchange/support/ExchangeServerPeer.java | 19 ++-- .../exchange/support/FileExchangeGroup.java | 27 +++-- .../support/FileExchangeNetworker.java | 19 ++-- .../support/MulticastExchangeGroup.java | 19 ++-- .../support/MulticastExchangeNetworker.java | 19 ++-- .../remoting/p2p/support/AbstractGroup.java | 25 +++-- .../dubbo/remoting/p2p/support/FileGroup.java | 27 +++-- .../remoting/p2p/support/FileNetworker.java | 19 ++-- .../remoting/p2p/support/MulticastGroup.java | 19 ++-- .../p2p/support/MulticastNetworker.java | 19 ++-- .../remoting/p2p/support/ServerPeer.java | 19 ++-- .../alibaba/dubbo/remoting/p2p/PeerMain.java | 33 +++---- .../remoting/zookeeper/ChildListener.java | 16 +++ .../remoting/zookeeper/StateListener.java | 16 +++ .../remoting/zookeeper/ZookeeperClient.java | 16 +++ .../zookeeper/ZookeeperTransporter.java | 16 +++ .../curator/CuratorZookeeperClient.java | 16 +++ .../curator/CuratorZookeeperTransporter.java | 16 +++ .../support/AbstractZookeeperClient.java | 16 +++ .../zookeeper/zkclient/ZkClientWrapper.java | 22 ++++- .../zkclient/ZkclientZookeeperClient.java | 16 +++ .../ZkclientZookeeperTransporter.java | 16 +++ .../curator/CuratorZookeeperClientTest.java | 23 ++++- dubbo-remoting/pom.xml | 19 ++-- 231 files changed, 2424 insertions(+), 2130 deletions(-) diff --git a/dubbo-registry/dubbo-registry-default/pom.xml b/dubbo-registry/dubbo-registry-default/pom.xml index 45b4fbbc23..30c3ba908c 100644 --- a/dubbo-registry/dubbo-registry-default/pom.xml +++ b/dubbo-registry/dubbo-registry-default/pom.xml @@ -1,3 +1,4 @@ + diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyBackedChannelBuffer.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyBackedChannelBuffer.java index 86b78e0510..c1ea506801 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyBackedChannelBuffer.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyBackedChannelBuffer.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.alibaba.dubbo.remoting.transport.netty4; import com.alibaba.dubbo.common.utils.Assert; @@ -12,7 +28,7 @@ import java.io.OutputStream; import java.nio.ByteBuffer; /** - * @author kimi + * */ public class NettyBackedChannelBuffer implements ChannelBuffer { diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyChannel.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyChannel.java index 2115cc78b7..1c77f97345 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyChannel.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyChannel.java @@ -1,12 +1,13 @@ /* - * Copyright 1999-2011 Alibaba Group. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,6 +23,7 @@ import com.alibaba.dubbo.common.logger.LoggerFactory; import com.alibaba.dubbo.remoting.ChannelHandler; import com.alibaba.dubbo.remoting.RemotingException; import com.alibaba.dubbo.remoting.transport.AbstractChannel; + import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; @@ -32,10 +34,6 @@ import java.util.concurrent.ConcurrentMap; /** * NettyChannel. - * - * @author qian.lei - * @author william.liangf - * @author qinliujie */ final class NettyChannel extends AbstractChannel { diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyClient.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyClient.java index e814a137d1..a3212a4bfe 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyClient.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyClient.java @@ -1,12 +1,13 @@ /* - * Copyright 1999-2011 Alibaba Group. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,6 +26,7 @@ import com.alibaba.dubbo.remoting.ChannelHandler; import com.alibaba.dubbo.remoting.RemotingException; import com.alibaba.dubbo.remoting.transport.AbstractClient; import com.alibaba.dubbo.remoting.transport.netty4.logging.NettyHelper; + import io.netty.bootstrap.Bootstrap; import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.Channel; @@ -39,10 +41,6 @@ import java.util.concurrent.TimeUnit; /** * NettyClient. - * - * @author qian.lei - * @author william.liangf - * @author qinliujie */ public class NettyClient extends AbstractClient { diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyClientHandler.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyClientHandler.java index 4c8f4dbd53..f75d7028dd 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyClientHandler.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyClientHandler.java @@ -1,12 +1,13 @@ /* - * Copyright 1999-2011 Alibaba Group. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,15 +18,13 @@ package com.alibaba.dubbo.remoting.transport.netty4; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.remoting.ChannelHandler; + import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; /** * NettyClientHandler - * - * @author william.liangf - * @author qinliujie */ @io.netty.channel.ChannelHandler.Sharable public class NettyClientHandler extends ChannelDuplexHandler { diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyCodecAdapter.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyCodecAdapter.java index 9eeda06296..dc15705c30 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyCodecAdapter.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyCodecAdapter.java @@ -1,12 +1,13 @@ /* - * Copyright 1999-2011 Alibaba Group. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,6 +19,7 @@ package com.alibaba.dubbo.remoting.transport.netty4; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.remoting.Codec2; import com.alibaba.dubbo.remoting.buffer.ChannelBuffer; + import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; @@ -30,20 +32,17 @@ import java.util.List; /** * NettyCodecAdapter. - * - * @author qian.lei - * @author qinliujie */ final class NettyCodecAdapter { private final ChannelHandler encoder = new InternalEncoder(); - + private final ChannelHandler decoder = new InternalDecoder(); - private final Codec2 codec; - - private final URL url; - + private final Codec2 codec; + + private final URL url; + private final com.alibaba.dubbo.remoting.ChannelHandler handler; public NettyCodecAdapter(Codec2 codec, URL url, com.alibaba.dubbo.remoting.ChannelHandler handler) { diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServer.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServer.java index f36641822c..ef70c2d902 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServer.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServer.java @@ -1,12 +1,13 @@ /* - * Copyright 1999-2011 Alibaba Group. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,6 +29,7 @@ import com.alibaba.dubbo.remoting.Server; import com.alibaba.dubbo.remoting.transport.AbstractServer; import com.alibaba.dubbo.remoting.transport.dispatcher.ChannelHandlers; import com.alibaba.dubbo.remoting.transport.netty4.logging.NettyHelper; + import io.netty.bootstrap.ServerBootstrap; import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.ChannelFuture; @@ -46,10 +48,6 @@ import java.util.Map; /** * NettyServer - * - * @author qian.lei - * @author chao.liuc - * @author qinliujie */ public class NettyServer extends AbstractServer implements Server { diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServerHandler.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServerHandler.java index 8a4ec55da8..e23a500c26 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServerHandler.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyServerHandler.java @@ -1,12 +1,13 @@ /* - * Copyright 1999-2011 Alibaba Group. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,6 +20,7 @@ import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.common.utils.NetUtils; import com.alibaba.dubbo.remoting.Channel; import com.alibaba.dubbo.remoting.ChannelHandler; + import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; @@ -29,9 +31,6 @@ import java.util.concurrent.ConcurrentHashMap; /** * NettyClientHandler - * - * @author william.liangf - * @author qinliujie */ @io.netty.channel.ChannelHandler.Sharable public class NettyServerHandler extends ChannelDuplexHandler { @@ -64,7 +63,7 @@ public class NettyServerHandler extends ChannelDuplexHandler { NettyChannel channel = NettyChannel.getOrAddChannel(ctx.channel(), url, handler); try { if (channel != null) { - channels.put(NetUtils.toAddressString((InetSocketAddress)ctx.channel().remoteAddress()), channel); + channels.put(NetUtils.toAddressString((InetSocketAddress) ctx.channel().remoteAddress()), channel); } handler.connected(channel); } finally { diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyTransporter.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyTransporter.java index ef145c4c70..29f07037dc 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyTransporter.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/NettyTransporter.java @@ -1,12 +1,13 @@ /* - * Copyright 1999-2011 Alibaba Group. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,13 +24,13 @@ import com.alibaba.dubbo.remoting.Server; import com.alibaba.dubbo.remoting.Transporter; /** - * @author ding.lid - * @author qinliujie + * + * */ public class NettyTransporter implements Transporter { public static final String NAME = "netty4"; - + public Server bind(URL url, ChannelHandler listener) throws RemotingException { return new NettyServer(url, listener); } diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/FormattingTuple.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/FormattingTuple.java index fadfdc9429..a4d086ecdb 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/FormattingTuple.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/FormattingTuple.java @@ -1,41 +1,18 @@ /* - * Copyright 2013 The Netty Project + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * The Netty Project licenses this file to you under the Apache License, - * version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -/** - * Copyright (c) 2004-2011 QOS.ch - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.alibaba.dubbo.remoting.transport.netty4.logging; diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/MessageFormatter.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/MessageFormatter.java index b5238e0b75..5ccf3f38bc 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/MessageFormatter.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/MessageFormatter.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.alibaba.dubbo.remoting.transport.netty4.logging; diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/NettyHelper.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/NettyHelper.java index f340ece0ae..8231bfa99e 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/NettyHelper.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/com/alibaba/dubbo/remoting/transport/netty4/logging/NettyHelper.java @@ -1,11 +1,12 @@ /* - * Copyright 1999-2011 Alibaba Group. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,8 +23,7 @@ import io.netty.util.internal.logging.InternalLogger; import io.netty.util.internal.logging.InternalLoggerFactory; /** - * @author kimi - * @author qinliujie + * */ public class NettyHelper { diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/test/java/com/alibaba/AppTest.java b/dubbo-remoting/dubbo-remoting-netty4/src/test/java/com/alibaba/AppTest.java index bd5f99fe50..436822407c 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/test/java/com/alibaba/AppTest.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/test/java/com/alibaba/AppTest.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.alibaba; import junit.framework.Test; diff --git a/dubbo-remoting/dubbo-remoting-p2p/pom.xml b/dubbo-remoting/dubbo-remoting-p2p/pom.xml index 17c29730ee..0a9c2c1f16 100644 --- a/dubbo-remoting/dubbo-remoting-p2p/pom.xml +++ b/dubbo-remoting/dubbo-remoting-p2p/pom.xml @@ -1,12 +1,13 @@