I have an application (java) based on a websocket server (embedded jetty 8), and I'm looking for a method to return the number of current connections. Does something like this exist? thank
http://wiki.eclipse.org/Jetty/Tutorial/Statistics
This will be one way to do this, the other is to enable jmx and pull it out of beans. If you need the jmx + rest approach, you can use the setting described here:
http://webtide.intalio.com/2011/05/jetty-jmx-webservice/
Finally, if you want to do it yourself, you can see how it got together in the statistics handler and set up its own code for it.
http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-server/src/main/java/org/eclipse/jetty/server/handler/StatisticsHandler.java
(, , undeleting, , , , , , , )