0
votes

An embedded jetty server is running at a particular port number. I want to get that running instance to stop from

1

1 Answers

0
votes

Take a look at either the STOP.PORT mechanism or the shutdown handler.

http://wiki.eclipse.org/Jetty/Howto/Secure_Termination

or

http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/server/handler/ShutdownHandler.html

there is example embedded usage in the shutdown handler javadoc linked.

cheers