ChannelGroup Javadoc updated - please review

Frederic Bregier fredbregier at free.fr
Thu Apr 23 06:12:41 EDT 2009


Hi Trustin,

Maybe I'm wrong, so check if what I'm saying is correct... ;-)

1) In ChannelGroup, the example show how to add the "child" channels
but did not show the add of the "parent" channel.
As in your comment, you specifiy the way parent and child are taken
into account when the close on the ChannelGroup occurs, perhaps you
could set something like (if it was missed and not in intentional):

public static void main(String[] args) throws Exception {
     ServerBootstrap b = new ServerBootstrap(..);
     ...

     // Start the server
     b.getPipeline().addLast("handler", new MyHandler());
     Channel serverChannel = b.bind(..);
     // Add the Server Channel to the ChannelGroup
     allchannels.add(serverChannel);

     ... Wait until the shutdown signal reception ...

     // Close the serverChannel and then all accepted connections.
     allChannels.close().awaitUninterruptibly();
     b.releaseExternalResources();
 }

2) Still in ChannelGroup, maybe a simple example on how to use bulk
operations other than close (a lot of question in the ML about that)
like "How to write to all registered and active channels in a group"?

Simply something like allChannels.write(messageBroadcast)

3) In ChannelGroupFuture, you specified that await should be banned
as most as possible. But in the example of ChannelGroup, you used
await (even awaitUninterruptibly). I know that this is perfectly ok
here since it is outside all IO threads. However, perhaps in the doc
you could say that there might be an exception when close is called
if the close is called outside any IO threads or at least make a 
remark in the ChannelGroup?
Another way could be to create a listener that runs 
releaseExternalResources?
I don't know which is better...

4) A question (might be a comment on the doc?), what is the purpose
of the find method in the ChannelGroupFuture. I have some difficulty
to see what kind exactly of ChannelFuture it returns?

Other than that, as always, perfect! What I like in Netty is that the
documentation is growing fast and is useful!!! Thanks to you!!!

Cheers,

Frederic


Trustin Lee-2 wrote:
> 
> Hi folks,
> 
> Rather than asking for reviewing a bunch of big Javadoc update, I
> decided to ask for your review for each package as early as possible.
> (Of course, you can give me feed back for any Netty packages :)
> 
> I've just updated Javadoc of org.jboss.netty.channel.group.  Please
> let me know if you find any errors or misleading sentences.  An idea
> to improve the documentation would be appreciated, too.  Check it out
> here:
> 
>   *
> http://www.jboss.org/file-access/default/members/netty/freezone/api/3.1/org/jboss/netty/channel/group/package-summary.html
> 
> While you review my work, I will move on to other packages.  Please
> keep posting what you want to see in the Javadoc!
> 
> Thanks in advance,
> 
> — Trustin Lee, http://gleamynode.net/
> 
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
> 
> 


-----
Hardware/Software Architect
-- 
View this message in context: http://n2.nabble.com/ChannelGroup-Javadoc-updated---please-review-tp2682022p2682117.html
Sent from the Netty User Group mailing list archive at Nabble.com.





More information about the netty-users mailing list