directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter royal <pro...@apache.org>
Subject Re: [mina] Introducing the New API for 0.9.1.
Date Sun, 22 Jan 2006 16:09:21 GMT
On Jan 22, 2006, at 9:56 AM, Trustin Lee wrote:
> * SocketAddress is replaced with IoAddress (org.apache.common )

What was wrong with using a SocketAddress?

> * All bind/unbind/connect operation is performed via  
> org.apache.commin.IoService.  There's no need to instantiate an  
> acceptor  implementation by yourself.  You never access  
> org.apache.mina.transport.* packages anymore.

I don't like having this as a singleton with static methods. I need  
to be able to have multiple instances in a single JVM, and this  
breaks that. The new setup is a monolithic, which while great for new  
users, makes it harder to tweak the behavior. The old setup was a  
composition of multiple components, and I preferred that API style.

If the new IoService was merely a layer on top of the old API, I'd be  
more in favor of that.

> * No more transport-type specific property getters and setters.   
> Now we use IoAddress properties and the user-defined attributes in  
> IoSession.  For example:

I liked the transport-specific getters and setters, since it provided  
a level of type-safety when setting the properties, and you knew what  
you were setting (there was javadoc on the methods, no chance of mis- 
typing the attribute name, etc).

  Also, there are now 'magic' attribute name that affect the  
operation of a session that can no longer be used as attribute names  
in user code.

I viewed IoSession.get/setAttribute to be akin to the servlet API's  
Session.get/setAttribute -- the container does nothing more than  
store the values for you.

							     --o-o-o-o-o-o-

The changes look like they help simplify usage of MINA in simple  
scenarios.. the examples are certainly much simpler, but for users  
that might have a more complex integration, they seem to be somewhat  
of a step backwards (my .02)

-pete

-- 
proyal@apache.org - http://fotap.org/~osi


Mime
View raw message