You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Trustin Lee <tr...@gmail.com> on 2005/04/21 14:03:06 UTC

[mina] Summary of today's changes

Hi,

1) I extracted common methods of IoSession and ProtocolSession to a
new class, Session, and added BaseSession that implements Session. 
Now most session types extend it.

Session also introduces new feature: user-defined attributes.  It is
similar to attachment, but you can have as many attributes as you
want.  Attachment is redefined as a user-defined attribute whose key
is "" (empty string) still retaining backward compatibility.

We could also use user-defined attributes as a way to interact with
filters.  For example, a user could disable some filters for some
sessions.

But what if user wants to set default attributes?  We cannot simply
place setAttribute methods in sessionOpened() because the timing
becomes an issue when thread pool filter is in the chain. So....

2) SessionInitializer is introduced.

You can specify your SessionInitializer implementation as a parameter
of bind(...) and connect(...) methods so that SessionInitializer is
invoked before MINA starts to manage the session.  You could adjust
default socket parameters and set up default attributes there.

3) SessionManager is a top-level interface that all acceptors and
connectors implements now.

For now, there are only getter and setter of exceptionManager
property, but we could also add more common functionality in the
future.  How about getter of the number of active sessions?

The change is big, but it still retains API.  Any feedbacks are welcome.

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [mina] Summary of today's changes

Posted by Alex Karasulu <ao...@bellsouth.net>.
Hiya Vinod,

>PS: List owner, can the list pls pls pls be configured so that the
>reply-to header is overwritten?  I know that this might be an
>inflammatory issue, but finally its the list that suffers due to mails
>that are inadvertently not sent to the list.
>  
>
I just took a look at the headers and the reply-to header is infact set 
to dev@directory.apache.org which is the new list.  I checked using the 
view->headers->all feature on thunderbird.  Let me know if you see 
things differently.

Thanks,
Alex



Re: [mina] Summary of today's changes

Posted by Vinod Panicker <vi...@gmail.com>.
Hi,

On 4/22/05, Trustin Lee <tr...@gmail.com> wrote:
> Hi,
> 
> 2005/4/21, Vinod Panicker <vi...@gmail.com>:
> <snip/>
> 
> > Would it be possible to have a default SessionInitializer being passed
> > to SessionManager directly so that all sessions can have some default
> > properties?
> 
> I added defaultSessionInitializer property to SessionManager so that
> you can specify default SessionInitializer when no initializer is
> specified as a parameter.

Thats great.  This would make it much more practical to implement.

> 
> A default implementation, DefaultSessionInitializer, is also added.
> You could create its new instance, set some default attribute, and set
> it as a default initializer.  You'll have to extend
> DefaultSessionInitializer if you want to adjust socket parameters.
> 
> Thanks,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> 


PS: List owner, can the list pls pls pls be configured so that the
reply-to header is overwritten?  I know that this might be an
inflammatory issue, but finally its the list that suffers due to mails
that are inadvertently not sent to the list.

Re: [mina] Summary of today's changes

Posted by Vinod Panicker <vi...@gmail.com>.
On 4/21/05, Trustin Lee <tr...@gmail.com> wrote:
> Hi,
> 
--snip--

> 
> 2) SessionInitializer is introduced.
> 
> You can specify your SessionInitializer implementation as a parameter
> of bind(...) and connect(...) methods so that SessionInitializer is
> invoked before MINA starts to manage the session.  You could adjust
> default socket parameters and set up default attributes there.
> 
> 3) SessionManager is a top-level interface that all acceptors and
> connectors implements now.
> 
> For now, there are only getter and setter of exceptionManager
> property, but we could also add more common functionality in the
> future.  How about getter of the number of active sessions?

Would it be possible to have a default SessionInitializer being passed
to SessionManager directly so that all sessions can have some default
properties?

Getting number of active sessions would be a cute addition :)

--snip--

Regards,
Vinod.