users@grizzly.java.net

Re: How do I close a Grizzly listener?

From: Mark Hig <mark.higginbottom_at_gmail.com>
Date: Thu, 3 Jul 2008 03:55:57 -0700 (PDT)

I think I have the answer now. The example I was looking at did not have a
Controller. I have added a controller to the selector:

con = new Controller();
sel.setController(con);

This allows me to do con.stop(); which will shutdown the listener.
con.pause() and con.resume() allow me to pause the listener.

Is this correct?


If I dont have a controller can I just do:

sel.stopEndpoint()

to stop the listener?


    thanks, Mark.





Mark Hig wrote:
>
> Hi,
>
> I am following the example of an Asyncronous Server. I have the server up
> and running and passing messages into my framework for processing.
> However, how do I shut down the server gracefully?
>
> I need to stop the listener from accepting incoming requests until all
> outstanding requests/connections have been serviced and closed. Then to
> shut down the listener completely or to start accepting requests again.
>
> Also, how do I configure the backlog setting on the listener socket?
>
> Thanks,
>
> Mark
>
>

-- 
View this message in context: http://www.nabble.com/How-do-I-close-a-Grizzly-listener--tp18255544p18256722.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.