Le jeudi 19 octobre 2006 à 15:51 +0900, Trustin Lee a écrit :
> Hi community,
> 
> I've just checked in very important changes in MINA core API.  To feel what
> has changed, please take a look into this diff:
> 
> http://svn.apache.org/viewvc/directory/trunks/mina/example/src/main/java/org/apache/mina/example/reverser/Main.java?r1=448088&r2=465510
> 
> Basically, I changed all IoService implementations to work with only one
> service.  That is, one IoAcceptor can bind to only one port.  Because
> IoAcceptor works with only one service at a time, I moved all parameters in
> bind() method to properties with getters and setters.  Some setters will
> throw IllegalStateException when the handler is already bound and the
> settings cannot be changed.
> 
> IoConnector works a little bit differently; I moved the parameters in call()
> to properties with getters and setters, but there's no big change
> essentially.  You can set remoteAddress again and call connect() to connect
> to a different host.
> 
> I also removed IoAcceptorBeanFactory in integration-spring package because
> our IoAcceptors are already spring-friendly.  All you have to do is to set
> init-method and destroy-method attributes in your <bean/> tag.  Binding
> class has been removed together.
> 
> The next step is to split IoService, IoAcceptor, IoConnector into two
> categories; one is read-only, and the other is configurable (e.g.
> ConfigurableIoConnector) like spring framework did.
> 
> I hope you enjoy the simplified API, and please give us as much feed back as
> you can.
> 
> Cheers,
> Trustin

I think it's really a great API improvement. The example is talking by
itself.

Would be nice to put the port and the handler in a convenient
constructor for a simplified instanciation.

Julien

Reply via email to