directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: asynchronous writing with MINA
Date Thu, 03 Nov 2005 02:04:26 GMT
Hi Srini,

I'm sorry for this late reply!

2005/10/29, srini <mailtosri@yahoo.com>:
>
> One more question and i really appreciate your help.
>  Is it legal to bind the same instance of the IoHandler class with
> multiple service instances as shown below:
>  ServiceRegistry registry = new SimpleServiceRegistry();
>  Service s1 = new Service ("app1", TransportType.SOCKET, 100000);
>  Service s1 = new Service ("app2", TransportType.SOCKET, 100010);
>  Service s1 = new Service ("app3", TransportType.SOCKET, 100020);
>  IOHandlerAdapter handler = new IOHandlerAdapter();
>  registry.bind(s1, handler);
> registry.bind(s2.handler);
> registry.bind(s3,handler);
>  My application requires to open different ports for different purposes
> and wondering whether the above is correct or not?
>

Correct definitely. :)

Three services will share the same IoAcceptor, so if you add any filter to
the acceptor, then all services will get affected.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message