Add more javadocs
This commit is contained in:
parent
a1baeeb8c0
commit
d2060ee3f1
@ -35,8 +35,8 @@ import java.util.concurrent.TimeUnit;
|
||||
*
|
||||
* public class MyChannelInitializer extends {@link ChannelInitializer} {
|
||||
* public void initChannel({@link Channel} channel) {
|
||||
* {@link Channel}.pipeline().addLast("readTimeoutHandler", new {@link ReadTimeoutHandler}(30);
|
||||
* {@link Channel}.pipeline().addLast("myHandler", new MyHandler());
|
||||
* channel.pipeline().addLast("readTimeoutHandler", new {@link ReadTimeoutHandler}(30);
|
||||
* channel.pipeline().addLast("myHandler", new MyHandler());
|
||||
* }
|
||||
* }
|
||||
*
|
||||
|
@ -38,8 +38,8 @@ import java.util.concurrent.TimeUnit;
|
||||
*
|
||||
* public class MyChannelInitializer extends {@link ChannelInitializer} {
|
||||
* public void initChannel({@link Channel} channel) {
|
||||
* {@link Channel}.pipeline().addLast("writeTimeoutHandler", new {@link WriteTimeoutHandler}(30);
|
||||
* {@link Channel}.pipeline().addLast("myHandler", new MyHandler());
|
||||
* channel.pipeline().addLast("writeTimeoutHandler", new {@link WriteTimeoutHandler}(30);
|
||||
* channel.pipeline().addLast("myHandler", new MyHandler());
|
||||
* }
|
||||
* }
|
||||
*
|
||||
|
@ -29,6 +29,19 @@ import io.netty.logging.InternalLoggerFactory;
|
||||
* {@link ServerBootstrap#handler(ChannelHandler)} and {@link ServerBootstrap#childHandler(ChannelHandler)} to
|
||||
* 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.
|
||||
*
|
||||
* @param <C> A sub-type of {@link Channel}
|
||||
|
Loading…
Reference in New Issue
Block a user