From 0b8687cdeb2c00205d1a6670b185a3c3e80d95a7 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Wed, 24 Sep 2008 09:55:19 +0000 Subject: [PATCH] More explanation on the characteristics of bootstraps --- .../java/org/jboss/netty/bootstrap/ClientBootstrap.java | 9 +++++++++ .../java/org/jboss/netty/bootstrap/ServerBootstrap.java | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/main/java/org/jboss/netty/bootstrap/ClientBootstrap.java b/src/main/java/org/jboss/netty/bootstrap/ClientBootstrap.java index fe5b4a9ce7..7bbe746fa8 100644 --- a/src/main/java/org/jboss/netty/bootstrap/ClientBootstrap.java +++ b/src/main/java/org/jboss/netty/bootstrap/ClientBootstrap.java @@ -90,6 +90,15 @@ import org.jboss.netty.channel.SimpleChannelHandler; * } * * + *

Applying different settings for different {@link Channel}s

+ * + * {@link ClientBootstrap} is just a helper class. It neither allocates nor + * manages any resources. What manages the resources is the + * {@link ChannelFactory} implementation you specified in the constructor of + * {@link ClientBootstrap}. Therefore, it is OK to create as many + * {@link ClientBootstrap} instances as you want to apply different settings + * for different {@link Channel}s. + * * @author The Netty Project (netty-dev@lists.jboss.org) * @author Trustin Lee (tlee@redhat.com) * diff --git a/src/main/java/org/jboss/netty/bootstrap/ServerBootstrap.java b/src/main/java/org/jboss/netty/bootstrap/ServerBootstrap.java index 2d13b35419..5e1887c6b0 100644 --- a/src/main/java/org/jboss/netty/bootstrap/ServerBootstrap.java +++ b/src/main/java/org/jboss/netty/bootstrap/ServerBootstrap.java @@ -124,6 +124,15 @@ import org.jboss.netty.channel.SimpleChannelHandler; * } * * + *

Applying different settings for different {@link Channel}s

+ * + * {@link ServerBootstrap} is just a helper class. It neither allocates nor + * manages any resources. What manages the resources is the + * {@link ChannelFactory} implementation you specified in the constructor of + * {@link ServerBootstrap}. Therefore, it is OK to create as many + * {@link ServerBootstrap} instances as you want to apply different settings + * for different {@link Channel}s. + * * @author The Netty Project (netty-dev@lists.jboss.org) * @author Trustin Lee (tlee@redhat.com) *