private static String getConnectorKey(WebsocketEndpoint endpoint) {
return endpoint.getProtocol() + ":" + endpoint.getHost() + ":" + endpoint.getPort();
}
private void enableJmx(Server server) {
MBeanContainer containerToRegister = getMbContainer();
if (containerToRegister != null) {
LOG.info("Jetty JMX Extensions is enabled");
server.getContainer().addEventListener(containerToRegister);
// Since we may have many Servers running, don't tie the MBeanContainer
// to a Server lifecycle or we end up closing it while it is still in use.