Fixed documentation error in Client / Server Bootstrap
This commit is contained in:
parent
e80c7dbe0e
commit
27095ce2b4
@ -35,6 +35,7 @@ import org.jboss.netty.channel.Channel;
|
|||||||
import org.jboss.netty.channel.ChannelConfig;
|
import org.jboss.netty.channel.ChannelConfig;
|
||||||
import org.jboss.netty.channel.ChannelFactory;
|
import org.jboss.netty.channel.ChannelFactory;
|
||||||
import org.jboss.netty.channel.ChannelFuture;
|
import org.jboss.netty.channel.ChannelFuture;
|
||||||
|
import org.jboss.netty.channel.ChannelHandler;
|
||||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||||
import org.jboss.netty.channel.ChannelPipeline;
|
import org.jboss.netty.channel.ChannelPipeline;
|
||||||
import org.jboss.netty.channel.ChannelPipelineCoverage;
|
import org.jboss.netty.channel.ChannelPipelineCoverage;
|
||||||
@ -68,9 +69,10 @@ import org.jboss.netty.channel.SimpleChannelHandler;
|
|||||||
*
|
*
|
||||||
* Every channel has its own {@link ChannelPipeline} and you can configure it
|
* Every channel has its own {@link ChannelPipeline} and you can configure it
|
||||||
* in two ways.
|
* in two ways.
|
||||||
*
|
* <p>
|
||||||
* {@linkplain #setPipeline(ChannelPipeline) The first approach} is to use
|
* {@linkplain #setPipeline(ChannelPipeline) The first approach} is to use
|
||||||
* the default pipeline and let the bootstrap to clone it for each new channel:
|
* the default pipeline and let the bootstrap to shallow-copy the default
|
||||||
|
* pipeline for each new channel:
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* ClientBootstrap b = ...;
|
* ClientBootstrap b = ...;
|
||||||
@ -82,6 +84,13 @@ import org.jboss.netty.channel.SimpleChannelHandler;
|
|||||||
* p.addLast("logic", new LogicHandler());
|
* p.addLast("logic", new LogicHandler());
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* Please note 'shallow-copy' here means that the added {@link ChannelHandler}s
|
||||||
|
* are not cloned but only their references are added to the new pipeline.
|
||||||
|
* Therefore, you have to choose the second approach if you are going to open
|
||||||
|
* more than one {@link Channel} whose {@link ChannelPipeline} contains any
|
||||||
|
* {@link ChannelHandler} whose {@link ChannelPipelineCoverage} is {@code "one"}.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
* {@linkplain #setPipelineFactory(ChannelPipelineFactory) The second approach}
|
* {@linkplain #setPipelineFactory(ChannelPipelineFactory) The second approach}
|
||||||
* is to specify a {@link ChannelPipelineFactory} by yourself and have full
|
* is to specify a {@link ChannelPipelineFactory} by yourself and have full
|
||||||
* control over how a new pipeline is created. This approach is more complex:
|
* control over how a new pipeline is created. This approach is more complex:
|
||||||
|
@ -103,8 +103,8 @@ import org.jboss.netty.channel.SimpleChannelHandler;
|
|||||||
* configure it in two ways.
|
* configure it in two ways.
|
||||||
*
|
*
|
||||||
* {@linkplain #setPipeline(ChannelPipeline) The first approach} is to use
|
* {@linkplain #setPipeline(ChannelPipeline) The first approach} is to use
|
||||||
* the default pipeline property and let the bootstrap to clone it for each
|
* the default pipeline and let the bootstrap to shallow copy the default
|
||||||
* new child channel:
|
* pipeline for each new child channel:
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* ServerBootstrap b = ...;
|
* ServerBootstrap b = ...;
|
||||||
@ -115,7 +115,14 @@ import org.jboss.netty.channel.SimpleChannelHandler;
|
|||||||
* p.addLast("decoder", new DecodingHandler());
|
* p.addLast("decoder", new DecodingHandler());
|
||||||
* p.addLast("logic", new LogicHandler());
|
* p.addLast("logic", new LogicHandler());
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* Please note 'shallow-copy' here means that the added {@link ChannelHandler}s
|
||||||
|
* are not cloned but only their references are added to the new pipeline.
|
||||||
|
* Therefore, you have to choose the second approach if you are going to accept
|
||||||
|
* more than one child {@link Channel} whose {@link ChannelPipeline} contains
|
||||||
|
* any {@link ChannelHandler} whose {@link ChannelPipelineCoverage} is
|
||||||
|
* {@code "one"}.
|
||||||
|
* <p>
|
||||||
* {@linkplain #setPipelineFactory(ChannelPipelineFactory) The second approach}
|
* {@linkplain #setPipelineFactory(ChannelPipelineFactory) The second approach}
|
||||||
* is to specify a {@link ChannelPipelineFactory} by yourself and have full
|
* is to specify a {@link ChannelPipelineFactory} by yourself and have full
|
||||||
* control over how a new pipeline is created. This approach is more complex:
|
* control over how a new pipeline is created. This approach is more complex:
|
||||||
|
Loading…
Reference in New Issue
Block a user