mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Vermillard <jvermill...@gmail.com>
Subject Re: [MINA3] Some points
Date Mon, 08 Apr 2013 18:40:19 GMT
Hi

Happy to see some feedback :)

On Mon, Apr 8, 2013 at 5:46 PM, Jeff MAURY <jeffmaury@jeffmaury.com> wrote:

> Hello,
>
> as I has been working on the Codec API and MINA3, I have some points I want
> to share with you:
>
> 1) Codec API
> The new Codec API does not define exceptions. It seems that the old one
> does with the notion of recoverable exception, should we define exceptions
> as well or no. If no, then we should document how an exception should be
> generated (RuntimeException, any other) and which are the preferred ones.
> Also, the decoder is expected to return an array of object, wouldn't it
> better to return a Collection ?
>

I'm agreeing here for just returning one object and we loop. It will be
much simpler.
And no need to create an array/collection when you decoded only 1 object.

2) Session objects are not immutable
> I noticed that session objects (assigned to clients and servers) are not
> immutable, but I think changing properties of such objects may lead to
> unexpected behavior. Would the Builder pattern more accurate ?
>
>
Some are mutable (the one used as default in the IoService) and some are
just proxy
on the underlying java.net.Socket methods.

I'm not a big fan of builders and "fluent" APIs but I'm curious to see
alternative proposal
for those configuration classes :)

Julien

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message