Salut,
Bill Simons wrote:
> I'm upgrading from grizzly version 1.8.6 to 1.9.15a and could use some
> advice. It seems that the Controller class no longer has a Pipeline
> and I'm not sure if it is safe for me to just remove the related code
> or if I need to replace it with something. In 1.8.6 my controller
> initialization code looked like:
>
> controller = new Controller();
> controller.addSelectorHandler( tcpSelectorHandler );
>
> Pipeline<Callable> pipeline = new DefaultPipeline();
> pipeline.setMaxThreads( 5 );
> controller.setPipeline( pipeline );
>
> What is the equivalent of this in 1.9.15a?
In 1.9.15 (it started with 1.9.0), we directly supports ExecutorService.
So you can do:
controller = new Controller();
controller.setThreadPool(new DefaultThreadPool());
see here
https://grizzly.dev.java.net/nonav/xref-test/com/sun/grizzly/RoundRobinSelectorHandlerTest.html#64
for an example.
Thanks!
-- Jeanfrancois
>
> Thanks,
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>