Hi all,
I refactored MINA API very heavily this weekend, and now it's time to show the result to you. Please feel free to browse my branch here:
http://svn.apache.org/viewcvs.cgi/directory/sandbox/trustin/mina-spi/
and here's the working examples:
http://svn.apache.org/viewcvs.cgi/directory/sandbox/trustin/mina-spi/examples/src/main/java/org/apache/mina/examples/
Here's the list of notable changes:
* SocketAddress is replaced with IoAddress (org.apache.common
)
* 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.
* 'registry' package is removed. Instead, IoService does the similar job.
* No more transport-type specific property getters and setters. Now we use IoAddress properties and the user-defined attributes in IoSession. For example:
ex1) IoService.bind( "nio:socket:*:8080?reuseAddress=true&threadModel=normal&threadPoolSize=20&receiveBufferSize=4096", new MyHandler() );
ex2) session.setAttribute( "receiveBufferSize", new Integer( 2048 ) ); //
org.apache.mina.common.RuntimeIOException will be thrown if this operation fails.
* Blacklist filter uses regular expressions to detect blacklisted sessions.
* Spring integration classes changed a lot due to these changes.
* Per-acceptor/connector IoFilterChainBuilder is removed. Instead we could implement IoService to support more attributes. For example, we could do like this:
IoService.connect( "nio:socket:
192.168.0.1:8080?reconnect=true&reconnectRetry=3&reconnectDelay=10", new MyIoHandler() );
Please feel free to criticize these changes. We're very open to your feedback. More feedback, better API! :)
Thanks in advance,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
PGP Key ID: 0x854B996C
- [mina] Introducing the New API for 0.9.1. Trustin Lee
- Re: [mina] Introducing the New API for 0.9.1. Trustin Lee
- Re: [mina] Introducing the New API for 0.9.1. peter royal
- Re: [mina] Introducing the New API for 0.9.1. Alex Karasulu
- Re: [mina] Introducing the New API for 0.9.1. Trustin Lee
- Re: [mina] Introducing the New API for 0.9.1. Trustin Lee
- Re: [mina] Introducing the New API for 0.9.1. peter royal
- RE: [mina] Introducing the New API for 0.9.1. Noel J. Bergman
- Re: [mina] Introducing the New API for 0.9.1. Trustin Lee
- Re: [mina] Introducing the New API for 0.9.1. Ersin Er
- Re: [mina] Introducing the New API for 0.9.1. Trustin Lee
