Add more javadocs

This commit is contained in:
Norman Maurer 2012-12-20 15:45:49 +01:00
parent a1baeeb8c0
commit d2060ee3f1
3 changed files with 17 additions and 4 deletions

View File

@ -35,8 +35,8 @@ import java.util.concurrent.TimeUnit;
* *
* public class MyChannelInitializer extends {@link ChannelInitializer} { * public class MyChannelInitializer extends {@link ChannelInitializer} {
* public void initChannel({@link Channel} channel) { * public void initChannel({@link Channel} channel) {
* {@link Channel}.pipeline().addLast("readTimeoutHandler", new {@link ReadTimeoutHandler}(30); * channel.pipeline().addLast("readTimeoutHandler", new {@link ReadTimeoutHandler}(30);
* {@link Channel}.pipeline().addLast("myHandler", new MyHandler()); * channel.pipeline().addLast("myHandler", new MyHandler());
* } * }
* } * }
* *

View File

@ -38,8 +38,8 @@ import java.util.concurrent.TimeUnit;
* *
* public class MyChannelInitializer extends {@link ChannelInitializer} { * public class MyChannelInitializer extends {@link ChannelInitializer} {
* public void initChannel({@link Channel} channel) { * public void initChannel({@link Channel} channel) {
* {@link Channel}.pipeline().addLast("writeTimeoutHandler", new {@link WriteTimeoutHandler}(30); * channel.pipeline().addLast("writeTimeoutHandler", new {@link WriteTimeoutHandler}(30);
* {@link Channel}.pipeline().addLast("myHandler", new MyHandler()); * channel.pipeline().addLast("myHandler", new MyHandler());
* } * }
* } * }
* *

View File

@ -29,6 +29,19 @@ import io.netty.logging.InternalLoggerFactory;
* {@link ServerBootstrap#handler(ChannelHandler)} and {@link ServerBootstrap#childHandler(ChannelHandler)} to * {@link ServerBootstrap#handler(ChannelHandler)} and {@link ServerBootstrap#childHandler(ChannelHandler)} to
* setup the {@link ChannelPipeline} of a {@link Channel}. * setup the {@link ChannelPipeline} of a {@link Channel}.
* *
* <pre>
*
* public class MyChannelInitializer extends {@link ChannelInitializer} {
* public void initChannel({@link Channel} channel) {
* channel.pipeline().addLast("myHandler", new MyHandler());
* }
* }
*
* {@link ServerBootstrap} bootstrap = ...;
* ...
* bootstrap.childHandler(new MyChannelInitializer());
* ...
* </pre>
* Be aware that this class is marked as {@link Sharable} and so the implementation must be safe to be re-used. * Be aware that this class is marked as {@link Sharable} and so the implementation must be safe to be re-used.
* *
* @param <C> A sub-type of {@link Channel} * @param <C> A sub-type of {@link Channel}