directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
Subject [mina] Summary of today's changes
Date Thu, 21 Apr 2005 12:03:06 GMT

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

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.

what we call human nature is actually human habit

View raw message