diff --git a/example/src/main/java/io/netty/example/iostream/IOStream.java b/example/src/main/java/io/netty/example/stdio/StdioLogger.java similarity index 90% rename from example/src/main/java/io/netty/example/iostream/IOStream.java rename to example/src/main/java/io/netty/example/stdio/StdioLogger.java index 624e2c0f34..c2010cc40d 100755 --- a/example/src/main/java/io/netty/example/iostream/IOStream.java +++ b/example/src/main/java/io/netty/example/stdio/StdioLogger.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.example.iostream; +package io.netty.example.stdio; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -27,24 +27,24 @@ import io.netty.channel.ChannelPipelineFactory; import io.netty.channel.DefaultChannelPipeline; import io.netty.channel.MessageEvent; import io.netty.channel.SimpleChannelHandler; -import io.netty.channel.iostream.IOStreamAddress; -import io.netty.channel.iostream.IOStreamChannelFactory; +import io.netty.channel.iostream.IoStreamAddress; +import io.netty.channel.iostream.IoStreamChannelFactory; import io.netty.handler.codec.frame.DelimiterBasedFrameDecoder; import io.netty.handler.codec.frame.Delimiters; import io.netty.handler.codec.string.StringDecoder; import io.netty.handler.codec.string.StringEncoder; /** - * An example demonstrating the use of the {@link io.netty.channel.iostream.IOStreamChannel}. + * An example demonstrating the use of the {@link io.netty.channel.iostream.IoStreamChannel}. */ -public class IOStream { +public class StdioLogger { private static volatile boolean running = true; public static void main(String[] args) { final ExecutorService executorService = Executors.newCachedThreadPool(); - final ClientBootstrap bootstrap = new ClientBootstrap(new IOStreamChannelFactory(executorService)); + final ClientBootstrap bootstrap = new ClientBootstrap(new IoStreamChannelFactory(executorService)); // Configure the event pipeline factory. bootstrap.setPipelineFactory(new ChannelPipelineFactory() { @@ -64,7 +64,7 @@ public class IOStream { e.getChannel().write("Message received: " + message); } if ("exit".equals(message)) { - IOStream.running = false; + StdioLogger.running = false; } super.messageReceived(ctx, e); } @@ -75,7 +75,7 @@ public class IOStream { }); // Make a new connection. - ChannelFuture connectFuture = bootstrap.connect(new IOStreamAddress(System.in, System.out)); + ChannelFuture connectFuture = bootstrap.connect(new IoStreamAddress(System.in, System.out)); // Wait until the connection is made successfully. Channel channel = connectFuture.awaitUninterruptibly().getChannel(); diff --git a/handler/src/main/java/io/netty/handler/ipfilter/CIDR4.java b/handler/src/main/java/io/netty/handler/ipfilter/CIDR4.java index ab6e773da4..1a4bc458b5 100644 --- a/handler/src/main/java/io/netty/handler/ipfilter/CIDR4.java +++ b/handler/src/main/java/io/netty/handler/ipfilter/CIDR4.java @@ -88,9 +88,6 @@ public class CIDR4 extends CIDR { return 1; } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.CIDR#contains(java.net.InetAddress) - */ @Override public boolean contains(InetAddress inetAddress) { int search = ipv4AddressToInt(inetAddress); diff --git a/handler/src/main/java/io/netty/handler/ipfilter/CIDR6.java b/handler/src/main/java/io/netty/handler/ipfilter/CIDR6.java index f47260afa6..2ee9c7bd29 100644 --- a/handler/src/main/java/io/netty/handler/ipfilter/CIDR6.java +++ b/handler/src/main/java/io/netty/handler/ipfilter/CIDR6.java @@ -93,9 +93,6 @@ public class CIDR6 extends CIDR { return res; } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.CIDR#contains(java.net.InetAddress) - */ @Override public boolean contains(InetAddress inetAddress) { BigInteger search = ipv6AddressToBigInteger(inetAddress); diff --git a/handler/src/main/java/io/netty/handler/ipfilter/IpFilterRuleHandler.java b/handler/src/main/java/io/netty/handler/ipfilter/IpFilterRuleHandler.java index a0a9d1089e..edb6cc9206 100644 --- a/handler/src/main/java/io/netty/handler/ipfilter/IpFilterRuleHandler.java +++ b/handler/src/main/java/io/netty/handler/ipfilter/IpFilterRuleHandler.java @@ -235,9 +235,6 @@ public class IpFilterRuleHandler extends IpFilteringHandlerImpl { return ipFilterRuleList.size(); } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.IpFilteringHandler#accept(io.netty.channel.ChannelHandlerContext, io.netty.channel.ChannelEvent, java.net.InetSocketAddress) - */ @Override protected boolean accept(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress) throws Exception { diff --git a/handler/src/main/java/io/netty/handler/ipfilter/IpFilteringHandlerImpl.java b/handler/src/main/java/io/netty/handler/ipfilter/IpFilteringHandlerImpl.java index 2ab117ffd1..b9d0c805ff 100644 --- a/handler/src/main/java/io/netty/handler/ipfilter/IpFilteringHandlerImpl.java +++ b/handler/src/main/java/io/netty/handler/ipfilter/IpFilteringHandlerImpl.java @@ -95,9 +95,6 @@ public abstract class IpFilteringHandlerImpl implements ChannelUpstreamHandler, } } - /* (non-Javadoc) - * @see io.netty.channel.ChannelUpstreamHandler#handleUpstream(io.netty.channel.ChannelHandlerContext, io.netty.channel.ChannelEvent) - */ @Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (e instanceof ChannelStateEvent) { @@ -153,17 +150,11 @@ public abstract class IpFilteringHandlerImpl implements ChannelUpstreamHandler, ctx.sendUpstream(e); } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.IpFilteringHandler#setIpFilterListener(io.netty.handler.ipfilter.IpFilterListener) - */ @Override public void setIpFilterListener(IpFilterListener listener) { this.listener = listener; } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.IpFilteringHandler#removeIpFilterListener() - */ @Override public void removeIpFilterListener() { this.listener = null; diff --git a/handler/src/main/java/io/netty/handler/ipfilter/OneIpFilterHandler.java b/handler/src/main/java/io/netty/handler/ipfilter/OneIpFilterHandler.java index 24d7868052..0f55e08dcb 100644 --- a/handler/src/main/java/io/netty/handler/ipfilter/OneIpFilterHandler.java +++ b/handler/src/main/java/io/netty/handler/ipfilter/OneIpFilterHandler.java @@ -40,9 +40,6 @@ public class OneIpFilterHandler extends IpFilteringHandlerImpl { /** HashMap of current remote connected InetAddress */ private final ConcurrentMap connectedSet = new ConcurrentHashMap(); - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.IpFilteringHandler#accept(io.netty.channel.ChannelHandlerContext, io.netty.channel.ChannelEvent, java.net.InetSocketAddress) - */ @Override protected boolean accept(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress) throws Exception { @@ -54,9 +51,6 @@ public class OneIpFilterHandler extends IpFilteringHandlerImpl { return true; } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.IpFilteringHandler#handleUpstream(io.netty.channel.ChannelHandlerContext, io.netty.channel.ChannelEvent) - */ @Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { super.handleUpstream(ctx, e); diff --git a/handler/src/main/java/io/netty/handler/ipfilter/PatternRule.java b/handler/src/main/java/io/netty/handler/ipfilter/PatternRule.java index fae5d0f888..1c827aa2e1 100644 --- a/handler/src/main/java/io/netty/handler/ipfilter/PatternRule.java +++ b/handler/src/main/java/io/netty/handler/ipfilter/PatternRule.java @@ -81,25 +81,16 @@ public class PatternRule implements IpFilterRule, Comparable { return this.pattern; } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.IpFilterRule#isAllowRule() - */ @Override public boolean isAllowRule() { return isAllowRule; } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.IpFilterRule#isDenyRule() - */ @Override public boolean isDenyRule() { return !isAllowRule; } - /* (non-Javadoc) - * @see io.netty.handler.ipfilter.IpSet#contains(java.net.InetAddress) - */ @Override public boolean contains(InetAddress inetAddress) { if (localhost) { diff --git a/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java b/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java index 320073bb40..45219228b3 100644 --- a/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java +++ b/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java @@ -369,9 +369,6 @@ public abstract class AbstractTrafficShapingHandler extends return trafficCounter; } - /* (non-Javadoc) - * @see io.netty.util.ExternalResourceReleasable#releaseExternalResources() - */ @Override public void releaseExternalResources() { if (trafficCounter != null) { diff --git a/transport/src/main/java/io/netty/channel/iostream/IOStreamAddress.java b/transport/src/main/java/io/netty/channel/iostream/IOStreamAddress.java index 933288fc1b..ec75a4e4c5 100755 --- a/transport/src/main/java/io/netty/channel/iostream/IOStreamAddress.java +++ b/transport/src/main/java/io/netty/channel/iostream/IOStreamAddress.java @@ -22,9 +22,9 @@ import java.net.SocketAddress; /** * A {@link java.net.SocketAddress} implementation holding an * {@link java.io.InputStream} and an {@link java.io.OutputStream} instance used - * as "remote" address to connect to with a {@link IOStreamChannel}. + * as "remote" address to connect to with a {@link IoStreamChannel}. */ -public class IOStreamAddress extends SocketAddress { +public class IoStreamAddress extends SocketAddress { private static final long serialVersionUID = -4382415449059935960L; @@ -32,7 +32,7 @@ public class IOStreamAddress extends SocketAddress { private final OutputStream outputStream; - public IOStreamAddress(final InputStream inputStream, final OutputStream outputStream) { + public IoStreamAddress(final InputStream inputStream, final OutputStream outputStream) { this.inputStream = inputStream; this.outputStream = outputStream; diff --git a/transport/src/main/java/io/netty/channel/iostream/IOStreamChannel.java b/transport/src/main/java/io/netty/channel/iostream/IOStreamChannel.java index 5a68ffb38c..6077d7c23b 100755 --- a/transport/src/main/java/io/netty/channel/iostream/IOStreamChannel.java +++ b/transport/src/main/java/io/netty/channel/iostream/IOStreamChannel.java @@ -28,25 +28,25 @@ import io.netty.channel.ChannelSink; * A channel to an {@link java.io.InputStream} and an * {@link java.io.OutputStream}. */ -public class IOStreamChannel extends AbstractChannel { +public class IoStreamChannel extends AbstractChannel { - IOStreamChannel(final ChannelFactory factory, final ChannelPipeline pipeline, final ChannelSink sink) { + IoStreamChannel(final ChannelFactory factory, final ChannelPipeline pipeline, final ChannelSink sink) { super(null, factory, pipeline, sink); } @Override public ChannelConfig getConfig() { - return ((IOStreamChannelSink) getPipeline().getSink()).getConfig(); + return ((IoStreamChannelSink) getPipeline().getSink()).getConfig(); } @Override public boolean isBound() { - return ((IOStreamChannelSink) getPipeline().getSink()).isBound(); + return ((IoStreamChannelSink) getPipeline().getSink()).isBound(); } @Override public boolean isConnected() { - return ((IOStreamChannelSink) getPipeline().getSink()).isConnected(); + return ((IoStreamChannelSink) getPipeline().getSink()).isConnected(); } @Override @@ -56,7 +56,7 @@ public class IOStreamChannel extends AbstractChannel { @Override public SocketAddress getRemoteAddress() { - return ((IOStreamChannelSink) getPipeline().getSink()).getRemoteAddress(); + return ((IoStreamChannelSink) getPipeline().getSink()).getRemoteAddress(); } @Override diff --git a/transport/src/main/java/io/netty/channel/iostream/IOStreamChannelFactory.java b/transport/src/main/java/io/netty/channel/iostream/IOStreamChannelFactory.java index 17b7246dac..74e2f09dc4 100755 --- a/transport/src/main/java/io/netty/channel/iostream/IOStreamChannelFactory.java +++ b/transport/src/main/java/io/netty/channel/iostream/IOStreamChannelFactory.java @@ -27,22 +27,22 @@ import io.netty.util.internal.ExecutorUtil; import java.util.concurrent.ExecutorService; /** - * A {@link io.netty.channel.ChannelFactory} for creating {@link IOStreamChannel} instances. + * A {@link io.netty.channel.ChannelFactory} for creating {@link IoStreamChannel} instances. */ -public class IOStreamChannelFactory implements ChannelFactory { +public class IoStreamChannelFactory implements ChannelFactory { private final ChannelGroup channels = new DefaultChannelGroup("IOStreamChannelFactory-ChannelGroup"); private final ExecutorService executorService; - public IOStreamChannelFactory(ExecutorService executorService) { + public IoStreamChannelFactory(ExecutorService executorService) { this.executorService = executorService; } @Override public Channel newChannel(final ChannelPipeline pipeline) { - IOStreamChannelSink sink = new IOStreamChannelSink(executorService); - IOStreamChannel channel = new IOStreamChannel(this, pipeline, sink); + IoStreamChannelSink sink = new IoStreamChannelSink(executorService); + IoStreamChannel channel = new IoStreamChannel(this, pipeline, sink); sink.setChannel(channel); channels.add(channel); return channel; diff --git a/transport/src/main/java/io/netty/channel/iostream/IOStreamChannelSink.java b/transport/src/main/java/io/netty/channel/iostream/IOStreamChannelSink.java index 6930a768e8..a0d75ceef7 100755 --- a/transport/src/main/java/io/netty/channel/iostream/IOStreamChannelSink.java +++ b/transport/src/main/java/io/netty/channel/iostream/IOStreamChannelSink.java @@ -37,13 +37,13 @@ import io.netty.channel.MessageEvent; * A {@link io.netty.channel.ChannelSink} implementation which reads from * an {@link java.io.InputStream} and writes to an {@link java.io.OutputStream}. */ -public class IOStreamChannelSink extends AbstractChannelSink { +public class IoStreamChannelSink extends AbstractChannelSink { private static class ReadRunnable implements Runnable { - private final IOStreamChannelSink channelSink; + private final IoStreamChannelSink channelSink; - public ReadRunnable(final IOStreamChannelSink channelSink) { + public ReadRunnable(final IoStreamChannelSink channelSink) { this.channelSink = channelSink; } @@ -88,9 +88,9 @@ public class IOStreamChannelSink extends AbstractChannelSink { private final ExecutorService executorService; - private IOStreamChannel channel; + private IoStreamChannel channel; - public IOStreamChannelSink(final ExecutorService executorService) { + public IoStreamChannelSink(final ExecutorService executorService) { this.executorService = executorService; } @@ -98,7 +98,7 @@ public class IOStreamChannelSink extends AbstractChannelSink { return inputStream != null && outputStream != null; } - public IOStreamAddress getRemoteAddress() { + public IoStreamAddress getRemoteAddress() { return remoteAddress; } @@ -110,11 +110,11 @@ public class IOStreamChannelSink extends AbstractChannelSink { return config; } - public void setChannel(final IOStreamChannel channel) { + public void setChannel(final IoStreamChannel channel) { this.channel = channel; } - private IOStreamAddress remoteAddress; + private IoStreamAddress remoteAddress; private OutputStream outputStream; @@ -139,7 +139,7 @@ public class IOStreamChannelSink extends AbstractChannelSink { if (Boolean.FALSE.equals(value)) { outputStream = null; inputStream = null; - ((IOStreamChannel) e.getChannel()).doSetClosed(); + ((IoStreamChannel) e.getChannel()).doSetClosed(); } break; @@ -148,7 +148,7 @@ public class IOStreamChannelSink extends AbstractChannelSink { case CONNECTED: if (value != null) { - remoteAddress = (IOStreamAddress) value; + remoteAddress = (IoStreamAddress) value; outputStream = remoteAddress.getOutputStream(); inputStream = new PushbackInputStream(remoteAddress.getInputStream()); executorService.execute(new ReadRunnable(this));