directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [mina] Introducing the New API for 0.9.1.
Date Mon, 23 Jan 2006 02:01:03 GMT
2006/1/23, Alex Karasulu <aok123@bellsouth.net>:
>
> > ex2) session.setAttribute( "receiveBufferSize", new Integer( 2048 )
> > );  // org.apache.mina.common.RuntimeIOException will be thrown if
> > this operation fails.
> Hmmm why not throw an IllegalArgumentEx ... just curious why this is a
> RtIOEx above.  Could you elaborate?


For example, Socket.getReceiveBufferSize() can throw a SocketException.  We
cannot throw an IllegalArgumentException because we didn't specify any
arguments.  That's why I created a RuntimeIOException.  Now we have
RuntimeIOException, so we also don't need to throw an
IllegalArgumentException from setAttribute() when a SocketException is
thrown.  Of course, the RuntimeExceptions are just passed through to the
caller, not being wrapped by RuntimeIOException.

> * Spring integration classes changed a lot due to these changes.
>
> What do you think the impact will be to all the protocol providers?


No impact at all.

> * 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
> > <
> http://192.168.0.1:8080?reconnect=true&reconnectRetry=3&reconnectDelay=10
> >",
> > new MyIoHandler() );
>
> Sorry I did not understand how this example explains the above.  Can you
> elaborate on it?


Most filters that are added to the session manager level are very generic
ones such as thread pool filter, logging filter, and etc.  So we can provide
them as a parameter of the address.

Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
PGP Key ID: 0x854B996C

Mime
View raw message